[9.3.0] Optimize retained size of ResourceSet for the common case - #30922
Merged
Merged
Conversation
iancha1992
enabled auto-merge
August 28, 2026 20:50
justinhorvitz
approved these changes
Aug 31, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 31, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Aug 31, 2026
iancha1992
force-pushed
the
cp30265_2
branch
from
September 2, 2026 21:39
3a7be28 to
680a3ae
Compare
…#30263) ### Description Instances are typically very large (> 180 bytes), so it's worth introducing an optimized version for the common case of CPU and memory usage set only. The common subcase of only an integral CPU limit can be further optimized by interning the instance. ### Motivation Since bazelbuild@6ac8c84, `ResourceSet` can be retained by Starlark actions. ### Build API Changes No ### Checklist - [x] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: None Closes bazelbuild#30263. PiperOrigin-RevId: 948482321 Change-Id: I7f6108247e3adb90a9bf41e0f21e5d5af0b93b37
iancha1992
force-pushed
the
cp30265_2
branch
from
September 2, 2026 21:44
680a3ae to
bcab82d
Compare
iancha1992
enabled auto-merge
September 2, 2026 21:44
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.
Description
Instances are typically very large (> 180 bytes), so it's worth introducing an optimized version for the common case of CPU and memory usage set only. The common subcase of only an integral CPU limit can be further optimized by interning the instance.
Motivation
Since 6ac8c84,
ResourceSetcan be retained by Starlark actions.Build API Changes
No
Checklist
Release Notes
RELNOTES: None
Closes #30263.
PiperOrigin-RevId: 948482321
Change-Id: I7f6108247e3adb90a9bf41e0f21e5d5af0b93b37
Commit 6ac8c84