Skip to content

Comments

Reduce Merkle tree footprint by using an ImmutableSortedMap#28735

Open
fmeum wants to merge 4 commits intobazelbuild:masterfrom
fmeum:optimize-merkle-tree-size
Open

Reduce Merkle tree footprint by using an ImmutableSortedMap#28735
fmeum wants to merge 4 commits intobazelbuild:masterfrom
fmeum:optimize-merkle-tree-size

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Feb 21, 2026

Description

An ImmutableSortedMap uses less memory than an ImmutableMap and access performance is masked by network I/O anyway. A secondary benefit is that memory usage becomes deterministic.

This includes pulling in a memory optimization to protobuf via a patch that is already active in the google3 version, thereby reducing the instance size of Digest to 32 bytes.

Motivation

Work towards #20478
Work towards #28734

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

@fmeum fmeum requested a review from a team as a code owner February 21, 2026 09:10
@github-actions github-actions bot added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Feb 21, 2026
@fmeum fmeum requested a review from tjgq February 21, 2026 09:10
@fmeum
Copy link
Collaborator Author

fmeum commented Feb 21, 2026

@bazel-io fork 9.1.0

@fmeum fmeum changed the title Reduce Merkle tree memory usage by using an ImmutableSortedMap Reduce Merkle tree footprint by using an ImmutableSortedMap Feb 21, 2026
@fmeum fmeum force-pushed the optimize-merkle-tree-size branch 5 times, most recently from fc6433d to f9b3356 Compare February 22, 2026 19:33
@fmeum fmeum force-pushed the optimize-merkle-tree-size branch from f9b3356 to 1e47e48 Compare February 23, 2026 09:13
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 team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant