-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(package): implement vcs status cache #14985
Conversation
This comment has been minimized.
This comment has been minimized.
This is aimed to cache duplicate works like file system or VCS info lookups.
It may not be worthy for the majority. Single file `git status` is generally fast. On some slow file systems or lower-end machines, skipping file system access might be helpful. However, slow file system access usually happen on Window. And we'll only have large amount of `git status` when rust-lang#14981 merges and the repo contains lots of symlinks. Given symlink handling story is crazy in real world Windows, I doubt anybody will hit the performance issue without this.
So this only really helps us with source files outside of the package root? Is this going to buy us enough gains to be worth the performance hit? |
Yes. This is kind of another speculation. It only helps in that situation and when having lots of workspace members sharing the same set of files-outside-package-root. I lean toward closing this and then revive #14962, once #14981 has merged. The workspace inheritance issue won't be harder to fix with or without #14962 |
☔ The latest upstream changes (possibly d85d761) made this pull request unmergeable. Please resolve the merge conflicts. |
Close as it is just a speculation. Could revisit when needed. At this moment for performance I favor something like #14997 |
What does this PR try to resolve?
Implement a VCS status cache for
cargo package
.It may not be worthy for the majority. Single file
git status
is generally fast.Also, it might only benefit whoever does
cargo package
for the entire workspace in one cargo invocation, such ascargo package --workspace
or using-Zpackage-workspace
.On some slow file systems or lower-end machines,
skipping file system access might be helpful.
However, slow file system access usually happens on Window.
And we'll only have large amount of
git status
when#14981 merges and the repo contains lots of symlinks.
Given symlink handling story is crazy in real world Windows
How should we test and review this PR?
I didn't really benchmark it.
If any reviewer doesn't think it is worth the complexity,
feel free to close hits.
Additional information