Skip to content

Improve package.json search performance#7

Open
djcsdy wants to merge 1 commit intonrigaudiere:masterfrom
djcsdy:search-perf
Open

Improve package.json search performance#7
djcsdy wants to merge 1 commit intonrigaudiere:masterfrom
djcsdy:search-perf

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.

1 participant