Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cache for jcClass #207

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

Damtev
Copy link
Member

@Damtev Damtev commented Dec 8, 2023

No description provided.

@Damtev Damtev requested a review from Saloed December 8, 2023 14:03
Copy link
Contributor

github-actions bot commented Dec 8, 2023

Lifecycle test results

48 tests  ±0   48 ✔️ ±0   1m 19s ⏱️ -6s
  5 suites ±0     0 💤 ±0 
  5 files   ±0     0 ±0 

Results for commit d584c0a. ± Comparison against base commit 207c306.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

Test results on JDK 19

1 270 tests  ±0   1 259 ✔️ ±0   4m 4s ⏱️ -13s
     45 suites ±0        11 💤 ±0 
     45 files   ±0          0 ±0 

Results for commit d584c0a. ± Comparison against base commit 207c306.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

Test results on JDK 8

1 270 tests  ±0   1 257 ✔️ ±0   4m 11s ⏱️ -1s
     45 suites ±0        13 💤 ±0 
     45 files   ±0          0 ±0 

Results for commit d584c0a. ± Comparison against base commit 207c306.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

Test results on JDK 11

1 270 tests  ±0   1 261 ✔️ ±0   4m 51s ⏱️ -1s
     45 suites ±0          9 💤 ±0 
     45 files   ±0          0 ±0 

Results for commit d584c0a. ± Comparison against base commit 207c306.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (207c306) 77.01% compared to head (d584c0a) 77.04%.

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lehvolk
Copy link
Collaborator

lehvolk commented Dec 13, 2023

@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

@Damtev
Copy link
Member Author

Damtev commented Dec 14, 2023

@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
Copy link
Collaborator

lehvolk commented Dec 14, 2023

@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.

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

@lehvolk
Copy link
Collaborator

lehvolk commented Dec 14, 2023

@Damtev my concern is that this fix will hide a problem or will not fix the problem.

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.

None yet

3 participants