dart-lang / dart_style

An opinionated formatter/linter for Dart code
https://pub.dev/packages/dart_style
BSD 3-Clause "New" or "Revised" License
646 stars 121 forks source link

Add some manual profiling instrumentation. #1445

Closed munificent closed 6 months ago

munificent commented 6 months ago

I'm not generally a fan of leaving debug-only code in a codebase, but the recursive nature of the formatter makes it really hard to use the DevTools CPU profiler effectively, and I'm tired of temporarily adding this code and deleting it all the time.

When profiling is disabled, it doesn't seem to effect the performance, so I think it's reasonable to just leave it in.