GROOVY-12264: Optimize the unrelated-default-method scan during class generation - #2795
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2795 +/- ##
==================================================
+ Coverage 70.1231% 70.1260% +0.0029%
- Complexity 35799 35807 +8
==================================================
Files 1562 1562
Lines 132400 132413 +13
Branches 24345 24355 +10
==================================================
+ Hits 92843 92856 +13
Misses 31159 31159
Partials 8398 8398
🚀 New features to boost your workflow:
|
JMH summary — classic (commit
|
| Group | Speedup | Calibrated | n |
|---|---|---|---|
| bench | 0.929 × | 1.002 × | 99 |
| core | 1.019 × | 1.034 × | 83 |
| grails | 1.102 × | 1.080 × | 80 |
⚠️ 7 benchmarks at least 1.5× slower than the 90-day baseline:
org.apache.groovy.perf.grails.CategoryBench.nestedCategories— 2.53× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.categoryShadowingExistingMethod— 2.52× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.categoryInLoop— 2.46× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.categoryWithOutsideCalls— 2.41× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.multipleCategoriesSimultaneous— 2.11× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.nestedCategoryOuterWrapping— 1.97× slower (calibrated)org.apache.groovy.perf.grails.CategoryBench.threeCategoriesSimultaneous— 1.75× slower (calibrated)
Runner calibration (this run vs baseline hardware): bench 0.93× (26 rulers) · core-ag 1.00× (3 rulers) · core-hz 0.96× (3 rulers) · grails-ad 0.95× (3 rulers) · grails-ez 1.08× (3 rulers)
Baseline: dev/bench/jmh/<part>/classic/data.js on gh-pages, trailing 90 days. Daily dashboard · Per-suite raw data
JMH summary — indy (commit
|
| Group | Speedup | Calibrated | n |
|---|---|---|---|
| bench | 1.389 × | 0.911 × | 99 |
| core | 2.678 × | 2.537 × | 83 |
| grails | 3.784 × | 3.850 × | 80 |
⚠️ 7 benchmarks at least 1.5× slower than the 90-day baseline:
org.apache.groovy.bench.AryBench.groovyCS ( {"n":"1000000"} )— 3.07× slower (calibrated)org.apache.groovy.bench.GeneratedHashCodeBench.generated_hashcode_on_instance_with_null_properties— 1.78× slower (calibrated)org.apache.groovy.bench.StaticMethodCallIndyBench.staticChain_groovyCS— 1.78× slower (calibrated)org.apache.groovy.bench.StaticMethodCallIndyBench.instanceChain_groovy— 1.76× slower (calibrated)org.apache.groovy.bench.dispatch.CallsiteBench.dispatch_1_monomorphic_groovyColdReflect— 1.67× slower (calibrated)org.apache.groovy.bench.dispatch.CallsiteBench.dispatch_1_monomorphic_groovy— 1.56× slower (calibrated)org.apache.groovy.bench.ScopedInvalidationBench.hotLoop_baseline— 1.52× slower (calibrated)
⚠️ Runner speed differs ≥15% from the historical baseline hardware for: bench. Raw speedups are not meaningful for those parts — use the calibrated column.
Runner calibration (this run vs baseline hardware): bench 1.48× (26 rulers) · core-ag 1.13× (3 rulers) · core-hz 0.96× (3 rulers) · grails-ad 0.99× (3 rulers) · grails-ez 0.98× (3 rulers)
Baseline: dev/bench/jmh/<part>/indy/data.js on gh-pages, trailing 90 days. Daily dashboard · Per-suite raw data
Extract conflict checking so the walker stays under the cognitive complexity cap and the inner loop no longer uses multiple continues. No behaviour change.
|
✅ All tests passed ✅🏷️ Commit: 8814f77 Learn more about TestLens at testlens.app. |



https://issues.apache.org/jira/browse/GROOVY-12264