Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented May 23, 2025

compilationinfo.getElements() in inner loop prevented the JVM from inlining calls into the loop body. Moving it out of the loop improves hint performance by 10x in files with many fields.

rest is cleanup

@mbien mbien added this to the NB27 milestone May 23, 2025
@mbien mbien requested a review from lahodaj May 23, 2025 02:29
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance hints labels May 23, 2025
Comment on lines +91 to +96
Elements elements = compilationInfo.getElements();
for (Element field : getAllMembers(compilationInfo, te)) {
if (stop) {
return null;
}
if (compilationInfo.getElements().hides(el, field)) {
if (elements.hides(el, field)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

that is the change

@mbien
Copy link
Member Author

mbien commented Jun 17, 2025

planning to merge this one soon since its one of the smaller ones

@mbien mbien added the Code cleanup Label for cleanup done on the Netbeans IDE label Jun 17, 2025
@mbien mbien force-pushed the faster-hides-field-hint branch from 1e012d6 to 23deda2 Compare June 17, 2025 23:12
compilationinfo.getElements() in inner loop prevented the JVM from
inlining calls into the loop body. Moving it out of the loop improves
performance by 10x in files with many fields.

rest is cleanup
@mbien mbien force-pushed the faster-hides-field-hint branch from 23deda2 to d1258e1 Compare June 22, 2025 18:57
@mbien mbien merged commit d3b435c into apache:master Jun 22, 2025
71 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code cleanup Label for cleanup done on the Netbeans IDE 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.

1 participant