Homebrew GCC takes ~500ms to start on Linux #6551
-
Additional Info
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Resolved. Running with This was resolved by moving |
Beta Was this translation helpful? Give feedback.
Resolved. Running with
stracerevealed that what was actually taking a long time was searchingPATHfor thegcc-15binary (which happened even when specifying an absolute path to the binary, seemingly as part of the dynamic linking process?). And the reason this was taking so long for me specifically is because my Homebrew binaries were after several/mnt/cdirectories in myPATH, which take longer to search.This was resolved by moving
"$HOMEBREW_PREFIX/binand$HOMEBREW_PREFIX/sbinto earlier in myPATH(specifically putting them right above themnt/cdirectories by doingexport PATH="${PATH/"/mnt/c/"/"$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:/mnt/c/"}")