fix: drastically reduce time taken to check for cycles#2874
Merged
JamesHenry merged 1 commit intolerna:mainfrom Jun 14, 2022
rix0rrr:main
Merged
fix: drastically reduce time taken to check for cycles#2874JamesHenry merged 1 commit intolerna:mainfrom rix0rrr:main
JamesHenry merged 1 commit intolerna:mainfrom
rix0rrr:main
Conversation
ghiscoding
added a commit
to lerna-lite/lerna-lite
that referenced
this pull request
Feb 5, 2022
- ref Lerna enhancement [#2874](lerna/lerna#2874)
In our monorepo with 219 packages, `lerna exec` takes 5 minutes to check for cycles in our package graph. Most of time is spent checking and re-checking the same nodes over and over again. Add a double-work breaker (a `Set` of already-visited nodes) to only visit every package once. Brings the time taken down to virtually nothing.
JamesHenry
approved these changes
Jun 14, 2022
Member
JamesHenry
left a comment
There was a problem hiding this comment.
Hi @rix0rrr 👋
Thank you very much for taking the initiative to contribute this PR!
You may or may not know that lerna is now under the stewardship of Nrwl (announcement here #3121), a company with a long history of not just producing valuable open-source software (OSS), but also backing others (at the time of writing, Nrwl has donated over $50,000 to OSS it hasn't created, see https://opencollective.com/nx for full details).
Quite simply, Nrwl ❤️ OSS, and is committed to making lerna the best it can be. We use it ourselves.
We hope you will continue to be a part of this community as we look to take things forward from here!
Please see #3140 for more details on our plans for 2022.
Many thanks again 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In our monorepo with 219 packages,
lerna exectakes 5 minutesto check for cycles in our package graph.
Most of time is spent checking and re-checking the same nodes over
and over again.
Add a double-work breaker (a
Setof already-visited nodes) to onlyvisit every package once.
Brings the time taken down to virtually nothing.
Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: