Skip to content
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

gen_rust_project: optimize aquery with many targets #2941

Merged

Conversation

TheLortex
Copy link
Contributor

Hi, if I'm not mistaken, in Bazel deps(a)+deps(b) is equivalent to deps(a+b). The latter is more efficient because it doesn't have to deduplicate common dependencies between a and b. This performance issue has been triggered in our configuration, as we track roughly 700 targets and 1600 transitive dependencies in our monorepo.
Running aquery with the original implementation takes 15 seconds on my machine while the implementation proposed in this PR takes 1.5 seconds.

Copy link

google-cla bot commented Oct 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@TheLortex TheLortex force-pushed the optimise_gen_rust_project_many_targets branch from 6d56be1 to cac7b36 Compare October 18, 2024 12:36
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! Thank you!

@UebelAndre UebelAndre added this pull request to the merge queue Oct 18, 2024
Merged via the queue into bazelbuild:main with commit 2e06150 Oct 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants