Skip to content

Reuse the empty runfiles provider - #31219

Open
dzbarsky wants to merge 1 commit into
bazelbuild:masterfrom
dzbarsky:codex/reuse-empty-runfiles-provider-upstream
Open

dzbarsky wants to merge 1 commit into
bazelbuild:masterfrom
dzbarsky:codex/reuse-empty-runfiles-provider-upstream

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Reuse RunfilesProvider.EMPTY only when both fields are the Runfiles.EMPTY singleton, preserving workspace and policy metadata on other empty runfiles. This reduces our retained heap by 27MB - nothing to write home about, but also a fairly simple optimization.

RELNOTES: None

Return RunfilesProvider.EMPTY when both runfiles fields are the Runfiles.EMPTY singleton. Keep identity checks so other empty runfiles retain workspace and policy metadata.

RELNOTES: None
@dzbarsky
dzbarsky requested a review from a team as a code owner September 19, 2026 19:46
@dzbarsky
dzbarsky requested review from mai93 and removed request for a team September 19, 2026 19:46
@github-actions github-actions Bot added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Sep 19, 2026
@fmeum
fmeum requested review from justinhorvitz and removed request for mai93 September 19, 2026 19:54
@github-actions github-actions Bot added the community-reviewed Reviewed by a trusted community contributor label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer community-reviewed Reviewed by a trusted community contributor team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants