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

path-dependencies are slow #4475

Open
sigurdm opened this issue Dec 17, 2024 · 0 comments
Open

path-dependencies are slow #4475

sigurdm opened this issue Dec 17, 2024 · 0 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@sigurdm
Copy link
Contributor

sigurdm commented Dec 17, 2024

When attempting to migrate the SDK to a workspace https://dart-review.googlesource.com/c/sdk/+/397164 we have all third-party dependencies as path-dependencies.

It takes quite long to resolve (~2sec).

Preliminary profiling reveals that canonicalizing the paths is taking most of the time.

The lib/src/io.dart canonicalize() procedure is walking through all parent directories, resolving them in turn, and iterating until everything is solved.

We should perhaps consider using File.resolveSymlinks() that asks the OS for resolution. (I think that might also have more "correct" semantics).

We should also consider caching the canonicalized paths.

@sigurdm sigurdm added the type-enhancement A request for a change that isn't a bug label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant