Skip to content

Conversation

rbnayax
Copy link
Contributor

@rbnayax rbnayax commented Sep 20, 2025

We have expeiricned degregaded performance for a while now, and I finally got around to investingating it. Appreantly, the get peers deps did not have any conccurency controls, and when you have 150 packages, it spwans 150 processes at the same time, causing my CPU to choke for a good minute.
I fixed that and also added a caching mechanism

Copy link
Owner

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

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

Thank you! This is a great improvement.

* @param version - The package version
* @returns Promise that resolves when peer dependencies are processed
*/
const processPeerDependencies = async ([pkg, version]: [string, Version]) => {
Copy link
Owner

Choose a reason for hiding this comment

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

processPeerDependencies currently relies on a mutation side effect to return its results. Using a typical return statement so that this is a pure function with no side effects would be preferable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@raineorshine raineorshine merged commit 574d483 into raineorshine:main Sep 22, 2025
9 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