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

Use quick = true when calculating PathRef for Mill executable #2785

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Sep 26, 2023

The Mill executable is a static file that is downloaded and doesn't change. Changing the PathRef calculation to quick = true makes it invalidate the cache everytime the mill executable changes.
Before it took ~160ms, after it takes ~100μs ~100 times faster. This code runs twice on every Mill command line task execution.
This also stores the PathRefs in memory so they don't need to be computed on every command invocation

Pull request: #2785

The Mill executable is a static file that is downloaded and doesn't change.
Changing the `PathRef` calculation to `quick = true` makes it invalidate
the cache everytime the mill executable changes.
Before it took ~160ms, after it takes ~100μs ~100 times faster.
This code runs twice on every Mill command line task execution.
@lolgab lolgab marked this pull request as ready for review September 26, 2023 18:30
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Thanks!

@lefou lefou merged commit 3ddb64f into com-lihaoyi:main Sep 26, 2023
37 checks passed
@lefou lefou added this to the 0.11.5 milestone Sep 26, 2023
@lolgab lolgab deleted the bootstrap-quick-true-pathref branch September 27, 2023 08:27
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 this pull request may close these issues.

None yet

2 participants