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.21k stars 381 forks source link

perf: Improve rule.Kind #1919

Closed dzbarsky closed 2 months ago

dzbarsky commented 2 months 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 2 months ago

Motivating profiles:

image image