Share classpath NestedSet between full and header compile actions#21343
Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Closed
Share classpath NestedSet between full and header compile actions#21343fmeum wants to merge 1 commit intobazelbuild:masterfrom
NestedSet between full and header compile actions#21343fmeum wants to merge 1 commit intobazelbuild:masterfrom
Conversation
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements.
ad0fc99 to
284d904
Compare
NestedSet between full and header compile actionsNestedSet between full and header compile actions
Collaborator
Author
hvadehra
approved these changes
Feb 15, 2024
Collaborator
Author
|
@hvadehra If that information is easy to get, I would be very interested in learning how much memory this saves to help build up my intuition. |
Collaborator
Author
|
@bazel-io fork 7.1.0 |
Member
Sure, I'll report back shortly. |
Member
|
Going by the numbers in #19872 (comment), looks like this saves ~20 bytes / javac action |
Contributor
|
Confirming, it's about 4MB (0.1%) for the benchmark target from #19872 (comment). |
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Feb 16, 2024
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements. Closes bazelbuild#21343. PiperOrigin-RevId: 607790056 Change-Id: Ia08c834ae3e5b1151607459408cdfea85d47314f
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 19, 2024
…ctions (#21389) The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same `NestedSet` instead of both retaining a new one with identical elements. Closes #21343. Commit 31fae9e PiperOrigin-RevId: 607790056 Change-Id: Ia08c834ae3e5b1151607459408cdfea85d47314f Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Member
|
The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Starlark Java rules already add the direct JARs to the transitive classpath depset and pass the same depset to the full and the header compile action. By allowing them to bypass the logic that prepends the direct jars to the compile-time classpath, both actions retain the same
NestedSetinstead of both retaining a new one with identical elements.