-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize cached-build codepaths #4026
Milestone
Comments
lihaoyi
added a commit
that referenced
this issue
Dec 14, 2024
Fixes #4129 and #4026. We never really looked at performance at this stuff before, but in order to support `selective.prepare __` (the default of `selective.prepare`) we need to improve these bottlenecks * Introduces the `ResolveCore#Cache` class that holds mutable dictionaries to memo-ize various expensive parts of the task resolution logic * Lots of micro-optimizations in various places: cache `Segments#hashCode`, avoid calling `Segments#render` for sorting or `Segments#part` for taking the last part, etc. Brings down `time ./mill plan __` from ~60s to ~3s
Leaving this open because while #4132 helps, we still need to move the name decoding logic to compile time in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running
time ./mill __.compile
on the Mill codebase, after everything is already compiled, takes about ~2.5 to run and do nothing../mill plan __.compile
shows about 16847 tasks, working out to be able 0.14ms to evaluate each cached task.Mill's codebase is unusual in having a large number of modules for its size, as it uses modules to define the various integration test cases. But this large number of modules is perhaps representative of large projects in general, and we should definitely be able to have better performance than this to support large projects.
The text was updated successfully, but these errors were encountered: