https://garden.io logo
#💻|dev
Do we have any concerns about making
# 💻|dev
p

polite-fountain-28010

11/13/2023, 9:58 AM
Do we have any concerns about making
GARDEN_GIT_SCAN_MODE=repo
the default? It's faster on all platforms, but significantly faster on Windows due to Windows having a high overhead for spawning subprocesses, and the
subtree
mode spawns a lot in larger projects.
Maybe @alert-helicopter-61082 has some more insights here? From what I can tell it works pretty stable and is fast.
s

swift-garage-61180

11/13/2023, 11:57 AM
Jón is best suited to answer this, but I think there was a suspicion back then that the
repo
  mode might be slower on some common repo types. Maybe smaller ones with not too many subtrees? But if we're starting to feel like it's a better default, then maybe we should try that out. It's always easy to revert the default mode in a follow-up release if we start hearing complaints.
p

polite-fountain-28010

11/13/2023, 1:50 PM
I've optimized it a bit a while back and now also made it fully work on Windows so I think it might be time to give it a shot. From my testing it's always faster now.
We should also see if we can eliminate more
git rev-parse --show-toplevel
calls from
getRepoRoot
, which are also very expensive on Windows when dealing with large projects.
s

swift-garage-61180

11/13/2023, 3:05 PM
Maybe we could cache the results of those calls (by working directory)?