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
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.
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.
The first step in optimizing something is to profile it. So I'd suggest the next action here would be to take one specific program in Anzu that has what seems like too many ROS-related runfiles, figure out which of them are spurious, hunt down which bzl code added the spurious things, and work to try to fix it to be more precise in what it lays claim to.
A nice mechanism to find runfile packrats is to look at the text files named bazel-bin/mypkg/myprog.runfiles/MANIFEST. That file has one line per runfile, and you can pretty easily grep/filter it to zoom in on ROS runfiles versus other external's runfiles to find hot spots.
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:
Some options:
data = []
deps in generated BUILD file.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?
The text was updated successfully, but these errors were encountered: