linter icon indicating copy to clipboard operation
linter copied to clipboard

`depend_on_referenced_packages`: cache available dependencies

Open pq opened this issue 3 years ago • 2 comments

It looks like a simple cache of the calculated packages (avoiding needless extra trips to process the pubspec) stand to make depend_on_referenced_packages twice as fast in our benchmarks.

NOTE that I generally think mutable static anything in a lint is an anti-pattern but in this case safe and probably worth it. Very open to discussion!

/cc @bwilkerson @jakemac53


Current run:

image

Previous run:

image

pq avatar Jul 25 '22 21:07 pq

Coverage Status

Coverage increased (+0.002%) to 95.744% when pulling 4a010cfe268eedebc2db884ff4339dcb14594490 on depend_on_referenced_packages_perf into 765db2153371b1721a8b9cd407233bd3c1580709 on main.

coveralls avatar Jul 25 '22 21:07 coveralls

SGTM

jakemac53 avatar Jul 26 '22 16:07 jakemac53

Good to land, @pq?

srawlins avatar Apr 17 '23 19:04 srawlins

Hmmmm. I seem to recall an issue with this one. I'm inclined to just close it for now and re-open if/when someone can investigate.

pq avatar Apr 17 '23 19:04 pq