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

perf(dependencies-hierarchy): cache previously found dependencies in getTree #2356

Merged
merged 1 commit into from Feb 13, 2020

Conversation

michens
Copy link
Member

@michens michens commented Feb 12, 2020

Introduces a cache for getTree.
Creates a helper function for getTree that returns dependencies along with whether there are any cycles in the tree in order to help calculate trees to the expected depth.
pnpm why takes two minutes in our repo without this change, but only three seconds with it.

close #2354

packages/dependencies-hierarchy/src/index.ts Outdated Show resolved Hide resolved
packages/dependencies-hierarchy/src/index.ts Outdated Show resolved Hide resolved
packages/dependencies-hierarchy/src/index.ts Outdated Show resolved Hide resolved
packages/dependencies-hierarchy/src/index.ts Outdated Show resolved Hide resolved
@zkochan zkochan merged commit 97fda69 into pnpm:master Feb 13, 2020
@zkochan zkochan modified the milestones: v4.9, v4.10 Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Enable use of lockfile for pnpm why
2 participants