bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

perf: Improve rule.Kind #1919

Closed dzbarsky closed 1 month ago

dzbarsky commented 1 month ago

What type of PR is this? Perf improvement

What package or component does this PR mostly affect? gazelle core

What does this PR do? Why is it needed? This is a simple change that is a ~2%+ improvement on our medium-sized repo. (The 2% is easily measurable; there is also decreased GC pressure which is spread out)

Which issues(s) does this PR fix?

Fixes #

Other notes for review

DavidZbarsky-at commented 1 month ago

Motivating profiles:

image image