Skip to content
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

./mill selective.prepare __ on the Mill codebase takes >60s #4129

Closed
lihaoyi opened this issue Dec 13, 2024 · 2 comments · Fixed by #4132
Closed

./mill selective.prepare __ on the Mill codebase takes >60s #4129

lihaoyi opened this issue Dec 13, 2024 · 2 comments · Fixed by #4132
Milestone

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Dec 13, 2024

It's only ~80,000 tasks, and ./mill resolve __ returns instantly so there is no reason it should take particularly long. Not sure if it's upstream non-input tasks taking time to evaluate (#4121), or just algorithmic slowness in the computation

@lihaoyi lihaoyi changed the title ./mill selective.prepare.__ on the Mill codebase takes >60s ./mill selective.prepare __ on the Mill codebase takes >60s Dec 13, 2024
@lihaoyi
Copy link
Member Author

lihaoyi commented Dec 13, 2024

Seems like the slowness is coming from the ./mill plan __ logic that selective.prepare uses to find the transitive upstream codebase. And a lot of the slowness is in ResolveCore.instantiateModule

@lihaoyi
Copy link
Member Author

lihaoyi commented Dec 14, 2024

Perhaps the reason resolve __ is fast while plan __ is slow is that resolve __ doesn't actually instantiate all the modules and tasks; it looks up the module and task names via reflection on the JVM metadata, and only instantiates the few modules necessary to determine Cross keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants