Skip to content

[9.3.0] Optimize retained size of ResourceSet for the common case - #30922

Merged
iancha1992 merged 1 commit into
bazelbuild:release-9.3.0from
iancha1992:cp30265_2
Sep 2, 2026
Merged

iancha1992 merged 1 commit into
bazelbuild:release-9.3.0from
iancha1992:cp30265_2

Conversation

@iancha1992

@iancha1992 iancha1992 commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

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, ResourceSet can be retained by Starlark actions.

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Closes #30263.

PiperOrigin-RevId: 948482321
Change-Id: I7f6108247e3adb90a9bf41e0f21e5d5af0b93b37

Commit 6ac8c84

@iancha1992
iancha1992 requested a review from a team as a code owner August 28, 2026 20:50
@iancha1992 iancha1992 added team-Performance Issues for Performance teams team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Aug 28, 2026
@github-actions github-actions Bot added team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts labels Aug 28, 2026
@iancha1992
iancha1992 enabled auto-merge August 28, 2026 20:50
@iancha1992
iancha1992 added this pull request to the merge queue Aug 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 31, 2026
@iancha1992
iancha1992 added this pull request to the merge queue Aug 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 31, 2026
…#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
iancha1992 enabled auto-merge September 2, 2026 21:44
@iancha1992
iancha1992 added this pull request to the merge queue Sep 2, 2026
Merged via the queue into bazelbuild:release-9.3.0 with commit 75ca417 Sep 2, 2026
41 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions team-Performance Issues for Performance teams team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants