• Mike McQuaid's avatar
    Improve speed of HOMEBREW_AUTO_UPDATE_SECS · 8ff2e9ae
    Mike McQuaid 创作于
    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.
    8ff2e9ae