-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Performance] Full build takes more time since 2024-09 (type inference) #3384
[Performance] Full build takes more time since 2024-09 (type inference) #3384
Conversation
optimize 1: + don't record pairs without any type arguments optimize 2: + stop traversal when both types are the same Fixes eclipse-jdt#3327
First observation:
Ergo it's safe to skip pairs without any type arguments. Perhaps my checks could even be strengthened: currently we proceed if only one type is parameterized. Second observation: We continue traversal to super types even when Erog it's safe to stop traveral when |
@fedejeanne the first optimization is effective if many non-generic types are involved. Does your original code contain lots of generics? If so, this particular optimization may not help a lot. |
I repeated the measurements from #3333 (comment) after applying both optimizations: ecj
for reference the original results ecj
javac
I'm curious how this micro benchmark will translate into practical experience ... |
strengthen optimization 1: + record only pairs where both types are parameterized Fixes eclipse-jdt#3327
It's an improvement, but does not fix the O(n^2) behavior. |
(eclipse-jdt#3384) optimize 3: + never visit the same super type more than once Fixes eclipse-jdt#3327
See #3387 |
As a rule of thumb, our code contains a lot of everything (it's just a huge code base 😅 ). I will try this optimization and see how much performance was gained. |
@stephan-herrmann I just compiled the whole workspace with yesterday's I-BUILD (v20241203-1917) and it went down from ~30 min to ~17 min! 👏 Here's a sample (sampled every 20ms): And here one can see that even though |
@fedejeanne The "Hits" column does not relate to call counting. it is only the number of samples taken that includes the method. |
Just for future reference, I tried it and you were right: the methods went all the way down in the hotspots --> #3387 (comment) |
optimize 1:
optimize 2:
Fixes #3327