-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate copy_to_directory performance #258
Comments
I am also having problems, but with analysis-phase performance of this rule. Our project is a graph of various ts_project, npm_package_link, npm_package, and js_library targets. When making a change to a BUILD file, such as to add a dep, the Bazel process uses 500% CPU for 15-20s, in the analysis phase (so before execution). Profiling shows that most of this time is spent in copy_to_directory_action: |
Thanks, @gregmagolan , analysis performance is good now. 🙌 Execution performance is still problematic, though, which is what the OP was about. Are you guys still planning to investigate this? Should we open a new issue or re-open this one? |
It seems to me that, besides simplifying the logic, one thing that would certainly improve perf for larger directories is performing the logic in parallel on different subtrees. At the moment this rule males very poor use of CPU as everything is serial and blocking. This should be easy to implement (eg in js or go) but I'm not sure how to do it in bash alone. |
See https://bazelbuild.slack.com/archives/CA31HN1T3/p1665178148461539.
A copy_to_directory on 2500 files is taking on the order of 10s. Investigate what's causing the slowness and see if there are any optimizations that can be made.
The text was updated successfully, but these errors were encountered: