-
|
Hi, I've been experimenting with migrating a big Maven monorepo to Mill. I found Mill pretty nice to work with so far, and got a lot of the base libraries migrated over without too much pain. I started with Unfortunately, now that I'm testing the build on some of the modules that build applications (so they have big dependency trees), the resolve step for Some context:
For comparison:
Based on some testing, and looking at mill-dependency-tree and the chrome profiler the curve on increasing task count seems pretty steep, though I'm not certain if that's the culprit:
It seems that, given a dependency tree A -> B -> C, if I run A, then run B, B doesn't need to re-resolve and finishes instantly, but then if I run A again, or some unrelated submodule D, then try to run A again, the dependency tree has to be recomputed from scratch. Once it finishes the Is this expected behavior or am I doing something obviously wrong? Given the benchmarks you have with mill itself (way more submodules than me) and Netty (around the same line count), I wouldn't expect this weird scaling behaviour. Any ideas for what I could test? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 4 replies
-
|
@bherw could you get JProfiler, run a CPU profile of the MillDaemonMain process while its stuck, and upload it here? That would give us a lot finer grained insight into where the time is going, and how we can fix it either in your build or upstream in Mill |
Beta Was this translation helpful? Give feedback.
-
|
14512 tasks isnt a large enough number I'd expect slow resolution, so the problem must be somewhere else in the Mill algorithm or structure of your build. More details, including the precise commands run that exhibit/do-not-exhibit the slowdowns, would also be helpful for debugging |
Beta Was this translation helpful? Give feedback.
-
|
Also a minimization of the codebase, e.g. just the build files with all source code deleted, would also help me investigate the issue |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks for the reply. I don't have JProfiler on me at the moment, but I ran a quick profile in IntelliJ and got the following: 26% of total time is spent the in My guess would be that somehow the classes generated from yaml are missing caching on the moduleDeps, so as the dependency tree grows, it's having to evaluate the dependencies for my utils module once for every time it's referenced transitively. It's a bit late here, but I'll see if I can get a minimal sample for you next week. |
Beta Was this translation helpful? Give feedback.
-
|
@bherw I tagged a development version |
Beta Was this translation helpful? Give feedback.
-
|
It worked great, thanks! 👍 Doing
I think there's still something slightly wonky going on, though. If I kill the mill daemon and run Is it possible that if the Here's a sample with just the build files if you'd like to take a look: mill-sample.tar.gz Thanks again. |
Beta Was this translation helpful? Give feedback.
-
|
Just as a followup note, after migrating to |
Beta Was this translation helpful? Give feedback.
@bherw year
__.testis not cached.__.testCachedshould be