Remove source level query from javadoc hint.#8417
Merged
mbien merged 1 commit intoapache:masterfrom Apr 15, 2025
Merged
Conversation
plus small inner loop optimization in TreeUtilities. The javadoc hint is typically in the top three list of slowest hints in files with many elements (fields, methods etc), even without the presence of javadoc sections. Due to its high per-file invocation count, a source level or preferences query can end up being quite expensive. Luckily the source level query wasn't even used, Preferences will be addressed separately.
lahodaj
approved these changes
Apr 15, 2025
Contributor
lahodaj
left a comment
There was a problem hiding this comment.
Looks sensible. Also note that we have CompilationInfo.getSourceVersion now, which is a much better way to get the version when CompilationInfo is available.
Member
Author
|
thanks for the review jan! |
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.
plus small inner loop optimization in
TreeUtilities.The javadoc hint is typically in the top three list of slowest hints in files with many elements (fields, methods etc), even without the presence of javadoc sections.
Due to its high per-file invocation count, a source level or preferences query can end up being quite expensive. Luckily the source level query wasn't even used, Preferences will be addressed separately since this is riskier and influences all hints.
eliminates all purple sections:

this "after" measurement contains another optimization which is not included int his PR:
before:
after:
(note javadoc hint moved to place 3)
used https://github.com/mbien/nb-reprorepo/tree/master/performance/classes as test case