Limit search scope of main class to source files and the specified project or paths#395
Merged
testforstephen merged 3 commits intomicrosoft:mainfrom Jan 24, 2022
Merged
Conversation
Contributor
- Allow searching main class from the specified project name
- Limit search scope of search engine to SOURCES, this can boost main class resolving performance a lot
jdneo
reviewed
Jan 21, 2022
|
|
||
| private List<ResolutionItem> resolveMainClassUnderProject(final String projectName) { | ||
| // Limit to search main method from source code only. | ||
| IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope(ProjectUtils.getJavaProjects(), |
Member
There was a problem hiding this comment.
Since here we know the projectName already, what about we find out the IJavaProject according to the projectName, and pass it as the first param of SearchEngine.createJavaSearchScope()?
jdneo
previously approved these changes
Jan 24, 2022
jdneo
approved these changes
Jan 24, 2022
Contributor
Author
|
The search performance comparison: Before: (7s to find main classes from spring-petclinic) Screen.Recording.2022-01-24.at.10.43.59.movNew: (1s to find main classes from spring-petclinic) Screen.Recording.2022-01-24.at.10.50.44.mov |
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.