Skip to content

Workspace: remove uncessary parallelism in BlazeConfigurationResolver#8198

Merged
LeFrosch merged 1 commit intobazelbuild:masterfrom
LeFrosch:pull/b620c3f930195a283f11900edc8a5b17f8c38235
Mar 5, 2026
Merged

Workspace: remove uncessary parallelism in BlazeConfigurationResolver#8198
LeFrosch merged 1 commit intobazelbuild:masterfrom
LeFrosch:pull/b620c3f930195a283f11900edc8a5b17f8c38235

Conversation

@LeFrosch
Copy link
Collaborator

@LeFrosch LeFrosch commented Mar 4, 2026

The computation in createResolveConfiguration is so cheap that it is not worth the overhead doing it in parallel (and makes it easier to read the code).

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the BlazeConfigurationResolver by eliminating unnecessary parallel processing for a low-cost computation. The change simplifies the code, enhancing readability and maintainability, without negatively impacting performance.

Highlights

  • Removed unnecessary parallelism: The parallel execution of createResolveConfiguration within buildBlazeConfigurationData was removed. The computation was deemed inexpensive, making the overhead of parallelism unwarranted and simplifying the code.
Changelog
  • cpp/src/com/google/idea/blaze/cpp/BlazeConfigurationResolver.java
    • Removed imports related to concurrent operations (e.g., ListenableFuture, Callable, ConcurrentMap, Maps, Futures, Collectors).
    • Added an import for java.util.HashMap.
    • Refactored the buildBlazeConfigurationData method to process target configurations sequentially using a standard HashMap instead of concurrent execution.
    • Deleted the submit helper method previously used for submitting tasks to an executor.
    • Updated variable declarations in findEquivalenceClasses to use final var for improved readability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively removes unnecessary parallelism from the buildBlazeConfigurationData method in BlazeConfigurationResolver.java. As stated in the pull request description, the createResolveConfiguration computation is cheap, making the overhead of parallel processing unwarranted. The refactoring simplifies the code significantly by replacing concurrent data structures and asynchronous execution with a more straightforward sequential approach using a HashMap and stream forEach. This change improves readability and maintainability without impacting performance negatively for this specific operation. The removal of the explicit (ScopedOperation) cast also contributes to cleaner code.

@LeFrosch LeFrosch marked this pull request as ready for review March 4, 2026 11:41
@github-actions github-actions bot added product: CLion CLion plugin awaiting-review Awaiting review from Bazel team on PRs labels Mar 4, 2026
@LeFrosch LeFrosch merged commit fe14ae4 into bazelbuild:master Mar 5, 2026
7 checks passed
@LeFrosch LeFrosch deleted the pull/b620c3f930195a283f11900edc8a5b17f8c38235 branch March 5, 2026 11:24
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Mar 5, 2026
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: CLion CLion plugin

Projects

Development

Successfully merging this pull request may close these issues.

2 participants