[XL] Change in fuchsia/fuchsia[main]: [pkg-cache] Used packed map for MetaContents

0 views
Skip to first unread message

'Erick Tryzelaar (Gerrit)' via owners-override

unread,
Apr 17, 2026, 1:19:12 PMApr 17
to Owners Override
Attention needed from Owners Override

Erick Tryzelaar has uploaded the change for review

Erick Tryzelaar would like Owners Override to review this change.

Commit message

[pkg-cache] Used packed map for MetaContents

This adds `PackedVec<T>`, which is similar to a `Vec<Box<[u8]>>` or
`Vec<String>`, and `PackedMap<K, V>`, which is similar to a
`BTreeMap<String, V>`. The keys are sorted and searched with a binary
search, but the optimized for fixed structures by inlining the keys into
a single `Vec` to reduce individual allocations and better memory
locality.

Furthermore, `MetaContents` is then updated to use `PackedMap` to reduce
memory usage serving the package directory.
Bug: 486283202
Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6

Change diff


Change information

Files:
  • M src/bringup/bin/bootpkg/BUILD.gn
  • M src/bringup/bin/bootpkg/src/lib.rs
  • M src/developer/ffx/plugins/package/archive/list/BUILD.gn
  • M src/developer/ffx/plugins/package/archive/list/src/lib.rs
  • M src/developer/ffx/plugins/package/archive/src/lib.rs
  • M src/lib/BUILD.gn
  • M src/lib/assembly/update_package/src/update_package.rs
  • A src/lib/collections/packed/BUILD.gn
  • A src/lib/collections/packed/OWNERS
  • A src/lib/collections/packed/README.md
  • A src/lib/collections/packed/src/lib.rs
  • A src/lib/collections/packed/src/packed_item.rs
  • A src/lib/collections/packed/src/packed_map.rs
  • A src/lib/collections/packed/src/packed_map_builder.rs
  • A src/lib/collections/packed/src/packed_vec.rs
  • M src/sys/pkg/lib/fuchsia-pkg-testing/src/package.rs
  • M src/sys/pkg/lib/fuchsia-pkg/BUILD.gn
  • M src/sys/pkg/lib/fuchsia-pkg/src/build.rs
  • M src/sys/pkg/lib/fuchsia-pkg/src/meta_contents.rs
  • M src/sys/pkg/lib/fuchsia-pkg/src/package_manifest.rs
  • M src/sys/pkg/lib/package-directory/BUILD.gn
  • M src/sys/pkg/lib/package-directory/src/meta_as_dir.rs
  • M src/sys/pkg/lib/package-directory/src/meta_subdir.rs
  • M src/sys/pkg/lib/package-directory/src/non_meta_subdir.rs
  • M src/sys/pkg/lib/package-directory/src/root_dir.rs
Change size: XL
Delta: 25 files changed, 2190 insertions(+), 185 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 34
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/59428348156e8010db6d24c4ae603f1bd97a74fe-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Erick Tryzelaar (Gerrit)' via owners-override

unread,
Apr 17, 2026, 1:19:16 PMApr 17
to Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com, fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com
Attention needed from Owners Override

Erick Tryzelaar voted and added 1 comment

Votes added by Erick Tryzelaar

Fuchsia-Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 34 (Latest):
Erick Tryzelaar . resolved

Adding owners-override to add a new top-level src/lib library.

Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 34
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Fri, 17 Apr 2026 17:19:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/59428348156e8010db6d24c4ae603f1bd97a74fe-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Adam Barth (Gerrit)' via owners-override

unread,
Apr 17, 2026, 2:04:08 PMApr 17
to Erick Tryzelaar, Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com, fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com
Attention needed from Erick Tryzelaar and Owners Override

Adam Barth voted and added 1 comment

Votes added by Adam Barth

Owners-Override+1

1 comment

Patchset-level comments
Adam Barth . resolved

Normally we prefer to add the OWNERS file in a separate commit.

Open in Gerrit

Related details

Attention is currently required from:
  • Erick Tryzelaar
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 34
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Attention: Erick Tryzelaar <etryz...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Fri, 17 Apr 2026 18:04:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/2d8e6f19c2e5d2c93414da08c1758b063faeb649-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Erick Tryzelaar (Gerrit)' via owners-override

unread,
Apr 21, 2026, 11:34:36 AMApr 21
to Adam Barth, Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com, fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com
Attention needed from Owners Override

Erick Tryzelaar voted and added 1 comment

Votes added by Erick Tryzelaar

Commit-Queue+1
Fuchsia-Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 35 (Latest):
Erick Tryzelaar . resolved

re-adding owners-override since I had to rebase due to a merge conflict.

Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 35
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Tue, 21 Apr 2026 15:34:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/e323bc822d8a019bcb61ced479a491ce2f6579de-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
satisfied_requirement
open
diffy

'Adam Barth (Gerrit)' via owners-override

unread,
Apr 21, 2026, 11:53:32 AMApr 21
to Erick Tryzelaar, Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com, fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com
Attention needed from Erick Tryzelaar and Owners Override

Adam Barth voted Owners-Override+1

Owners-Override+1
Open in Gerrit

Related details

Attention is currently required from:
  • Erick Tryzelaar
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 35
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>
Gerrit-Attention: Erick Tryzelaar <etryz...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Tue, 21 Apr 2026 15:53:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/bc14ad40e454ec6819c2889da3bd8f5f527242c3-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)' via owners-override

unread,
Apr 21, 2026, 11:55:32 AMApr 21
to Erick Tryzelaar, Adam Barth, Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com

fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com submitted the change with unreviewed changes

Unreviewed changes

33 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/sys/pkg/lib/fuchsia-pkg/BUILD.gn
Insertions: 1, Deletions: 0.

The diff is too large to show. Please review the diff.
```
```
The name of the file: src/lib/assembly/update_package/src/update_package.rs
Insertions: 1, Deletions: 1.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
[pkg-cache] Used packed map for MetaContents

This adds `PackedVec<T>`, which is similar to a `Vec<Box<[u8]>>` or
`Vec<String>`, and `PackedMap<K, V>`, which is similar to a
`BTreeMap<String, V>`. The keys are sorted and searched with a binary
search, but the optimized for fixed structures by inlining the keys into
a single `Vec` to reduce individual allocations and better memory
locality.

Furthermore, `MetaContents` is then updated to use `PackedMap` to reduce
memory usage serving the package directory.
Bug: 486283202
Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Reviewed-by: Suraj Malhotra <surajm...@google.com>
Commit-Queue: Erick Tryzelaar <etryz...@google.com>
Reviewed-by: David Koloski <dkol...@google.com>
Fuchsia-Auto-Submit: Erick Tryzelaar <etryz...@google.com>
Owners-Override: Adam Barth <aba...@google.com>
Reviewed-by: Ben Keller <galb...@google.com>
Reviewed-by: Aaron Wood <aaro...@google.com>
Delta: 25 files changed, 2190 insertions(+), 186 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Ben Keller, +2 by Suraj Malhotra, +2 by Aaron Wood, +2 by David Koloski
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 36
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/c8bb953bc7a472122eb577cd11825994a8e2df86-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'global-integration-ci-builder@fuchsia-infra.iam.gserviceaccount.com (Gerrit)' via owners-override

unread,
Apr 21, 2026, 11:58:09 AMApr 21
to Erick Tryzelaar, fuchsia-int...@luci-project-accounts.iam.gserviceaccount.com, Adam Barth, Owners Override, Aaron Wood, Suraj Malhotra, David Koloski, Ben Keller, global-integrat...@fuchsia-infra.iam.gserviceaccount.com

Message from global-integra...@fuchsia-infra.iam.gserviceaccount.com

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ie2baa29416e75e779702cc20f2dba4dc6de2b7f6
Gerrit-Change-Number: 1518419
Gerrit-PatchSet: 36
Gerrit-Owner: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Ben Keller <galb...@google.com>
Gerrit-Reviewer: David Koloski <dkol...@google.com>
Gerrit-Reviewer: Erick Tryzelaar <etryz...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Suraj Malhotra <surajm...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/3a80b1b18105ca38655a14aaa60ca18272862958-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages