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

Improve package.json search performance #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djcsdy
Copy link
Contributor

@djcsdy djcsdy commented Jun 4, 2019

This PR improves performance by skipping over node_modules directories.

Before this change, yarn-recursive would exhaustively search all subdirectories, including node_modules. Unwanted subdirectories were then filtered out after the fact. This caused an unnecessary delay on startup, especially for very large projects with lots of dependencies.

After this change, yarn-recursive skips over node_modules altogether - it never enters a node_modules directory or reads its contents.

Previously yarn-recursive would exhaustively search all
subdirectories, including node_modules. Unwanted subdirectories
were then filtered out after the fact. This caused an
unnecessary delay on startup, especially for very large
projects with lots of dependencies.

After this change, yarn-recursive skips over node_modules
altogether - it never enters a node_modules directory or
reads its contents.
@djcsdy
Copy link
Contributor Author

djcsdy commented Jun 4, 2019

On my fairly small project this reduces build times by six seconds. The saving is likely to be on the order of minutes for large projects.

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.

None yet

1 participant