-
Notifications
You must be signed in to change notification settings - Fork 135
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
Improve slow error prones: LambdaMethodReference and UnnecessarilyQualified #2997
Comments
I think |
I think there's some very low hanging fruit around |
See #2998 |
We should probably not run It's particularly expensive because it's difficult to determine whether generic type inference will work correctly, so we use the I like the idea of having the check around to clean up results from other checks, or perhaps running asynchronously via an excavator rather than enforcing for all compilations. Thoughts? |
I had also considered doing So I think the preference is:
|
Making it faster is difficult because it requires us to model language features like generic type inference to avoid ambiguity/failing suggestions. That's a bit more complexity than I'd prefer to encode, and it can change over time with future java releases as well. |
With LambdaMethodReference disabled by default and UnnecessarilyQualified dramatically improved, I think we're good to close? I'm still a bit surprised that IllegalSafeLoggingArgument takes as long as NullAway -- tracing nullability seems way more complicated than checking if an unsafe arg is a SafeArg.of() parameter. Maybe I'm off and it's doing much more than that. But there's much less juice to squeeze now with the above changes in place:
|
I ran with
-PerrorProneTimings
from palantir/suppressible-error-prone#38 on an internal repo and had a gradle module with these numbers:I'm surprised that LambdaMethodReference and UnnecessarilyQualified are so expensive. Especially compared to SafeLoggingPropagation, which seems like it'd be much more expensive to trace log safety through a codebase.
I've disabled these two slow error prones on a large internal repo and saw non-incremental compile speedup from 10m27s to 7m9s.
To re-enable these at some point in the future, is there anything we can do to improve performance and reduce runtime of these checks?
The text was updated successfully, but these errors were encountered: