Improve startup performance on large repos#108
Open
krauterbaquette wants to merge 2 commits intomock-server:masterfrom
Open
Improve startup performance on large repos#108krauterbaquette wants to merge 2 commits intomock-server:masterfrom
krauterbaquette wants to merge 2 commits intomock-server:masterfrom
Conversation
the glob pattern would search in all project files, including the whole node_modules folders which can take a long time if the project is really big. However the mockserver jar files can only be placed inside the node_modules/mockserver-node folder, so we only have to check this location which is a lot faster, also for huge projects
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.
As described in Issue #43 the glob patterns used in
downloadJar.jsare inefficient in large repositories because they scan the wholenode_modulesfolder as well as the rest of the project.We know that the
.jarfiles can only be inside thenode_modules/mockserver-nodedirectory, so we can only check this directory. Therefore the startup time is always the same, and does not increase with the size of the project.