Remove source level query from javadoc hint. #8417
Merged
+24
−34
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