Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented May 3, 2025

improves the performance of the phase in which the overrides editor annotations are computed (similar to #8437 but no cache is needed here).

691e6ca has the perf enhancement
93dcd63 JDK 17 lang level cleanup in the containing java.editor.overridden package

  • ClassIndex creation is expensive, ClasspahInfo initializes it lazily
  • this moves ClasspahInfo out of inner loops to reduce creation overhead of ClasspahInfo and its internal ClassIndex instance

running a synthetic test file with 10k package private elements

before:
ComputeOverrrides0

after:
ComputeOverrrides1

before:

ComputeAnnotations_delta: 8853

after:

ComputeAnnotations_delta: 4256

another hotspot with great potential for improvements is ElementUtils#getTypeElementByBinaryName, but this has to be addressed separately.

@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance Editor hints labels May 3, 2025
@mbien mbien added this to the NB27 milestone May 3, 2025
Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks!

@mbien
Copy link
Member Author

mbien commented May 22, 2025

thanks for the review! going to rebase before merge

mbien added 2 commits May 22, 2025 20:30
 - jdk 17 code improvements and cleanup
 - deprecation fixes
 - ClassIndex creation is expensive, ClasspahInfo initializes it lazily
 - this moves ClasspahInfo out of inner loops to reduce creation
   overhead of ClasspahInfo and its internal ClassIndex instance
@mbien mbien force-pushed the compute-overrides-performance branch from 691e6ca to bf86047 Compare May 22, 2025 18:34
@mbien mbien merged commit a1c1692 into apache:master May 22, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Editor hints Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants