You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
errors: speedup for large error counts and improve error filtering (#12631)
* errors: speedup for large error counts
We have a legacy codebase with many errors across many files
```
Found 7995 errors in 2218 files (checked 21364 source files)
```
For historical reasons, it hasn't been practical to fix all of
these yet, and we've been slowly chipping at them over time.
Profiling shows that `is_blockers` is the biggest single hotspot,
taking roughly 1min, and `total_errors` account for another 11s.
Instead of computing those values on read by iterating over all
errors, update auxiliary variables appropriately every time a
new error is recorded.
* errors: unify and optimize error filtering
Instead of maintaining two separate mechanism to filter out errors (boolean flag
in MessageBuilder and explicit copy of MessageBuilder/Errors) expand ErrorWatcher
to support all relevant usage patterns and update all usages accordingly.
This is both cleaner and more robust than the previous approach, and should also
offer a slight performance improvement by reducing allocations.
0 commit comments