-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download does not start immediately, a lot of network traffic (file is downloaded twice?) #18213
Comments
@marcel-idana Do you have a proxy/VPN? Does |
Thanks for your quick response! Weeks ago I tried to download files with I have two user accounts on my machine and changed user permissions with It also happen with the casks
Also the non cask formulae I also reinstalled Homebrew with no result. I still believe that my OS is in some odd state and i would be sorry if i wasted your time ✌🏼 |
I think this happens when upstream has no brew/Library/Homebrew/utils/curl.rb Line 232 in fafa618
Thus, essentially a double download. For example, in top 5 casks:
So far, only Microsoft and Google software. Anyway, should try to at least cache the GET to get ~2x speed up (maybe slightly less if any non- |
I also encountered a similar issue, through network monitoring, there is download traffic, but the progress bar takes a very long time to appear, and the progress bar starts from 0.
|
Taking another look at issue, the behavior may actually be a bug in macOS Specifically when using Using iTerm2 as an example: ❯ hyperfine '/usr/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip' '/opt/homebrew/opt/curl/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip'
Benchmark 1: /usr/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip
Time (mean ± σ): 2.043 s ± 0.283 s [User: 0.198 s, System: 0.054 s]
Range (min … max): 1.718 s … 2.546 s 10 runs
Benchmark 2: /opt/homebrew/opt/curl/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip
Time (mean ± σ): 97.7 ms ± 36.4 ms [User: 14.3 ms, System: 5.6 ms]
Range (min … max): 81.1 ms … 279.0 ms 28 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Summary
/opt/homebrew/opt/curl/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip ran
20.92 ± 8.31 times faster than /usr/bin/curl --head --request GET https://iterm2.com/downloads/stable/iTerm2-3_5_5.zip |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Install any homebrew cask. For example
rsudio
:This occurred also with
appcleaner
,webstorm
,goland
and more casks.What happened (include all command output)?
Installing a cask takes a lot of time, the download bar is not shown immediately and the installation causes a lot of network traffic. Maybe issue 10528 is related? Also maybe I have some odd OS state that triggers this.
In the shown output below a long pause with network activity occurs.
### LONG PAUSE WITH NETWORK ACTIVITY ###
is not part of the output was inserted by me.Full unmodified output:
What did you expect to happen?
Cask installation takes less time and the download bar is shown immediately.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: