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

Cache canonicalized version of paths in path dependencies #4495

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Jan 16, 2025

The canonicalize function is very slow, and the solver compares these a number of times.

This attempt of migrating the sdk to use workspaces https://dart-review.googlesource.com/c/sdk/+/397164?tab=comments has all third-party dependencies overridden as path-dependencies. 71 dependencies.

With current pub, this takes 2.245s to resolve on my machine.
After this fix it takes: 0.117s to resolve!

Also this avoid potential issues of inconsistencies if files change during resolution (although, still don't do that).

@sigurdm sigurdm requested a review from szakarias January 16, 2025 13:22
Copy link
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

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

LGTM

@sigurdm sigurdm merged commit 710265b into dart-lang:master Jan 16, 2025
23 checks passed
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.

2 participants