Added cache for `jcClass`
Lifecycle test results
48 tests ±0 48 :heavy_check_mark: ±0 1m 19s :stopwatch: -6s 5 suites ±0 0 :zzz: ±0 5 files ±0 0 :x: ±0
Results for commit d584c0a8. ± Comparison against base commit 207c3067.
:recycle: This comment has been updated with latest results.
Test results on JDK 19
1 270 tests ±0 1 259 :heavy_check_mark: ±0 4m 4s :stopwatch: -13s 45 suites ±0 11 :zzz: ±0 45 files ±0 0 :x: ±0
Results for commit d584c0a8. ± Comparison against base commit 207c3067.
:recycle: This comment has been updated with latest results.
Test results on JDK 8
1 270 tests ±0 1 257 :heavy_check_mark: ±0 4m 11s :stopwatch: -1s 45 suites ±0 13 :zzz: ±0 45 files ±0 0 :x: ±0
Results for commit d584c0a8. ± Comparison against base commit 207c3067.
:recycle: This comment has been updated with latest results.
Test results on JDK 11
1 270 tests ±0 1 261 :heavy_check_mark: ±0 4m 51s :stopwatch: -1s 45 suites ±0 9 :zzz: ±0 45 files ±0 0 :x: ±0
Results for commit d584c0a8. ± Comparison against base commit 207c3067.
:recycle: This comment has been updated with latest results.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.04%. Comparing base (
207c306) to head (d584c0a). Report is 10 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #207 +/- ##
=============================================
+ Coverage 77.01% 77.04% +0.02%
Complexity 1632 1632
=============================================
Files 166 166
Lines 9543 9543
Branches 1693 1693
=============================================
+ Hits 7350 7352 +2
+ Misses 1513 1508 -5
- Partials 680 683 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Damtev are there any proves that this change increases performance?
- Types has less time to live period
- request to find class by name is almost always hits class cache
- JcClass is huge object and will be nice to decouple types and classes. In this PR decopling process will be broken because holding reference to JcClassType almost always will hold link to JcClassOrInterface
@lehvolk jcClass is used in calculating the hashCode of the JcClassType, and we had met a situation when the hashCode of an instance of the JcClassType has changed. We assumed that happens because the jcClass getter sometimes returns different instances of JcClassOrInterface, which is quite unexpected for users.
@lehvolk
jcClassis used in calculating thehashCodeof theJcClassType, and we had met a situation when thehashCodeof an instance of theJcClassTypehas changed.
This is quite strange because JcClassOrInterface designed to have proper equals method. Only case which I can imagine is that the same class located into two different jars. If you check if name and generics substitution is that same then only possible difference may occur into AbstractByteCodeLocation#jarOrFolder file
@Damtev my concern is that this fix will hide a problem or will not fix the problem.