Skip to content

internal: Only prime direct dependencies of the workspace crates #10978

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

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Dec 10, 2021

This reduces the number of primed crates on self from 177 to 105.

# baseline
  86521 me   20   0 2939M  562M 14320 S  0.0  0.9  0:07.10   37 rust-analyzer

# pr
  99947 me   20   0 2935M  549M 14424 S  0.0  0.9  0:07.10   37 rust-analyzer

The RAM usage seems to vary a lot, so I'm not sure the improvement shown above is real.

We also drop the topological sorting, although it might still make sense to do the dependencies before the workspace crates. But since it's only used to make the progress reporting a bit more fine, it probably doesn't matter too much.

@lnicola
Copy link
Member Author

lnicola commented Dec 10, 2021

r? @jonas-schievink, CC @jhgg

fn toposort(graph: &CrateGraph, crates: &FxHashSet<CrateId>) -> Vec<CrateId> {
// Just subset the full topologically sorted set for simplicity.

let all = graph.crates_in_topological_order();
Copy link
Member

Choose a reason for hiding this comment

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

Is this method used elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's still used in a text fixture, but I'm not sure the order really matters there.

@jonas-schievink
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 10, 2021

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.

3 participants