I don’t have a dagger.cloud trace link, and I’m not connecting to dagger.cloud because I’m working in a corporate environment (and in general, issues with very large monorepos tend to appear first in such setups). A few other people have mentioned similar problems in the issue as well, so it doesn’t seem to be isolated to my case.
There was also an attempt to improve this in https://github.com/dagger/dagger/pull/8953, but that PR wasn’t merged. The workaround suggested in the comment https://github.com/dagger/dagger/pull/8953#issuecomment-2521794740 doesn’t seem to work for me, and the exact steps aren’t very clear (it’s possible I’m missing something). Additionally, the comment here https://github.com/dagger/dagger/issues/8496#issuecomment-2474995411 didn’t appear to get a response.
Just to restate the core issue more clearly:
We’re working with a large monorepo (>10GB; and we’ll soon be moving to an even larger one, >100GB — I haven’t tested that yet). If a Dagger module lives somewhere inside this repository, for example foo/bar/foo/test, and I run a simple command like dagger call -h from that module, the LOAD MODULE stage consistently takes at least ~40 seconds.
As soon as I run git init inside the module directory (or even in its parent directory), the load time drops significantly to ~1–3 seconds. Because of this behavior, it seems likely that the slowdown is related to how Dagger traverses the filesystem and looks for git metadata.
If there’s any additional information or data that would be helpful, please let me know — I’ll do my best to collect it locally.