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: load existing BUILD files concurrently #1928

Open jbedard opened 2 months ago

jbedard commented 2 months ago

Now that the fs is walked concurrently we can also load BUILDs concurrently at the same time, that is primarily the rule.LoadFile method.

If ReadBuildFilesDir is set then this may have a more significant performance gain because the extra os.ReadDir call will also be run concurrently now.

What type of PR is this?

Other

What package or component does this PR mostly affect?

all

What does this PR do? Why is it needed?

Performance