Skip to content

perf: add tree processing cache to avoid redundant computations#1

Open
zyf265600 wants to merge 14 commits into
masterfrom
performance-optimize-001
Open

perf: add tree processing cache to avoid redundant computations#1
zyf265600 wants to merge 14 commits into
masterfrom
performance-optimize-001

Conversation

@zyf265600

@zyf265600 zyf265600 commented Jul 21, 2025

Copy link
Copy Markdown
Owner

Cache NewClassTree processing in NullnessNoInitAnnotatedTypeFactory to prevent duplicate type annotation calculations.


Note

Adds a system property to disable the NonNull fast-path for new class sites and a jtreg benchmark to measure its performance impact.

  • Nullness Checker:
    • Adds runtime toggle cf.skipNonnullFastPath in NullnessNoInitAnnotatedTypeFactory to optionally skip hasEffectiveAnnotation(NONNULL) fast-path.
    • Updates visitNewClass to short-circuit when fast-path is enabled; otherwise always add missing @NonNull.
  • Performance Test:
    • Introduces checker/jtreg/nullness/perf/NewClassPerf.java to generate many new sites and time javac runs with/without the fast-path (-J-Dcf.skipNonnullFastPath=true).
    • Supports AB/BA/BOTH/SEPARATE protocols, warmups, and reports median/average deltas.

Written by Cursor Bugbot for commit 588ed47. This will update automatically on new commits. Configure here.

@zyf265600 zyf265600 force-pushed the performance-optimize-001 branch from d684a53 to da837a3 Compare September 11, 2025 04:54
@zyf265600 zyf265600 force-pushed the performance-optimize-001 branch from df7497d to 5bf54a6 Compare September 11, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants