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

Investigate opportunities to speed-up invariant_booleans. #57575

Closed
pq opened this issue May 22, 2017 · 3 comments
Closed

Investigate opportunities to speed-up invariant_booleans. #57575

pq opened this issue May 22, 2017 · 3 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-false-positive P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-performance Issue relates to performance or code size

Comments

@pq
Copy link
Member

pq commented May 22, 2017

Looking at the benchmarking bot, invariant_booleans is running considerably longer than other lints.

---------------------------------------------------
Timings                                          ms
---------------------------------------------------
public_member_api_docs                          157
invariant_booleans                              154
close_sinks                                      46
unnecessary_this                                 46

I wonder if there are any remaining opportunities for speed-up?

cc @alexeieleusis

FYI @bwilkerson

@pq pq added the type-performance Issue relates to performance or code size label May 22, 2017
@alexeieleusis
Copy link
Contributor

Back when I started contributing lints I thought about this one because I saw it was the one with more violations in several few big projects like the jdk and some big open source codebases. The experience with the Dart SDK was quite different with very few occurrences and few false positives, within my project there have been only false positives (surprisingly not easy to reproduce). Additionally most of the cases where this verification would be valuable are catched by literal_only_boolean_expression since the errors themselves seem to be "debugging leftovers". Apparently code review catches all of them.

All of this to say that probably this lint should be deprecated or at the very least make is clear that running it in CI (or similar) cycles should be enough to get the value it provides, for instance, in my team we have it disabled for IDE inspection.

I will look into it, but it has previously gone through a couple of cycles like this, so I am not very optimistic we can get much out of it.

@pq
Copy link
Member Author

pq commented Jun 22, 2018

FWIW, this one has crept to the top of the "slow lint" list.

image

Not sure if we want to deprecate (and should really track usage) but we should probably tag as slow (once we have support for tags -- #57719).

@srawlins
Copy link
Member

We've deprecated invariant_booleans and will not be fixing correctness bugs going forward.

@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-false-positive P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-performance Issue relates to performance or code size
Projects
None yet
Development

No branches or pull requests

4 participants