Skip to content

[bazel] Should minimize unneeded runfiles data? #337

@EricCousineau-TRI

Description

@EricCousineau-TRI

In Anzu, we have switched some rules to @rules_python (before, we had a monolith). As a side effect, .runfiles enumeration is becoming somewhat of a bottleneck for build time and CI performance.

In a related thread, @jwnimmer-tri mentioned:

FYI I also noticed while profiling that ROS2 is worse than it used to be. I see programs with 7000+ runfiles that are symlinks to stuff in /opt/ros, including symlinks to *.cmake files. Something there has gone sideways, and is probably a source of the ever-growing pain of bazel build //....

Some options:

  • Try to eliminate unneeded files from data = [] deps in generated BUILD file.
  • (heavy hammer, may need some crafting) Use declare_directory to consolidate when possible. I'm not sure what this looks like when using existing system folder.

@jwnimmer-tri @ggould-tri @IanTheEngineer Any other thoughts?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions