Do we have any concerns about making
# 💻|contributing
p
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
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
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
Maybe we could cache the results of those calls (by working directory)?
2 Views