Improve speed of HOMEBREW_AUTO_UPDATE_SECS

This variable allows a user to configure how often `brew update` runs.
With the previous implementation, however, it was still pretty slow as
it would run some of `brew update` even within the timeout. This feels
related to complaints about Homebrew "feeling slow" since we enabled
this. Address this by:

- making `HOMEBREW_AUTO_UPDATE_SECS` behave more like
  `HOMEBREW_NO_AUTO_UPDATE` and entirely skip the invocation of
  `brew update` if the relevant tap (homebrew-core or homebrew-cask
  depending on command invoked) has been checked in the last
  `HOMEBREW_AUTO_UPDATE_SECS`
- Only require/check the update of a single tap rather than every tap
- Increase the default value of `HOMEBREW_AUTO_UPDATE_SECS` from 1m
  to 5m to cut people a bit more slack. We're not updating things
  often enough for 1m not to feel a bit overkill and 5m feels
  appropriate for a Homebrew "session" to only require a single update.
This commit is contained in:
Mike McQuaid
2019-10-03 12:54:34 +01:00
parent 4f3d65c972
commit 8ff2e9ae4e
6 changed files with 19 additions and 11 deletions
+1 -1
View File
@@ -1068,7 +1068,7 @@ Note that environment variables must have a value set to be detected. For exampl
* `HOMEBREW_AUTO_UPDATE_SECS`:
If set, Homebrew will only check for autoupdates once per this seconds interval.
*Default:* `60`.
*Default:* `300`.
* `HOMEBREW_AWS_ACCESS_KEY_ID`, `HOMEBREW_AWS_SECRET_ACCESS_KEY`:
When using the `S3` download strategy, Homebrew will look in