Parse Indexables under a source root as a group while running EmbeddedIndexers #3516
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.
This is an attempt to fix the performance problem found while trying to open and index larger mx based project (GraalVM's Truffle). Because of an EmbeddingIndexer registered for the
text/x-java
mime type (TestMethodFinderImpl
), thousands of thejavac
compiler instances are created to index the project sources (one instance per source root viaJavaCustomIndexer
and instance per source/indexable viaRepositoryUpdater.indexEmbeddings
.This change tries to parse all sources/indexables under a source root as a group while running EmbeddedIndexers. Is saves thousands of the
javac
instances (only two instances per source root are created - one viaJavaCustomIndexer
, the second viaRepositoryUpdater.indexEmbeddings
) and approximately 20% of indexing time for the Truffle mx project.