Skip to content

UnusedHint: defer expensive checks until rewrite is performed #8485

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbien
Copy link
Member

@mbien mbien commented May 5, 2025

  • UnusedDetector is doing most of this work in findUnused() already
  • canSafelyRemove() can be likely moved into the rewrite step
  • text blocks for UnusedTest and minor warnings fixes

This would improve performance of the hint significantly. A synthetic test with 10k unused field is checked in 500ms instead of 20s.

There seems to be some redundancy in what UnusedDetector does and what canSafelyRemove() does. I am not completely sure if the additional check is still needed. Draft for now.

 - UnusedDetector is doing most of this work in findUnused() already
 - canSafelyRemove() can be likely moved into the rewrite step
 - text blocks for UnusedTest and minor warnings fixes
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance hints ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) hints Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant