Skip to content

Derive serialization for cached artifact records - #22061

Merged
charliermarsh merged 1 commit into
charlie/remove-hash-digest-wirefrom
charlie/derive-cache-record-serialize
Sep 30, 2026
Merged

charliermarsh merged 1 commit into
charlie/remove-hash-digest-wirefrom
charlie/derive-cache-record-serialize

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

We derive Serialize for Revision and Archive, writing MessagePack arrays instead of maps. This removes the custom serializers and saves 15 bytes per source revision and 32 bytes per wheel archive record.

The sdists-v10 and wheels-v7 bumps remove the need to support older readers that cannot accept the added size field.

@charliermarsh charliermarsh added the internal A refactor or improvement that is not user-facing label Sep 28, 2026
@charliermarsh
charliermarsh force-pushed the charlie/derive-cache-record-serialize branch from 142cbae to 682c64c Compare September 28, 2026 23:15
@charliermarsh
charliermarsh changed the base branch from charlie/sdist-revision-fastid to charlie/remove-hash-digest-wire September 28, 2026 23:15
@charliermarsh
charliermarsh force-pushed the charlie/derive-cache-record-serialize branch from 682c64c to 5919952 Compare September 29, 2026 17:16
@charliermarsh
charliermarsh force-pushed the charlie/derive-cache-record-serialize branch from 5919952 to 0b2bb0b Compare September 30, 2026 01:43
@charliermarsh
charliermarsh merged commit d5c2b10 into main Sep 30, 2026
112 of 174 checks passed
@charliermarsh
charliermarsh deleted the charlie/derive-cache-record-serialize branch September 30, 2026 02:07
@codspeed

codspeed Bot commented Sep 30, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by ×4

⚡ 1 improved benchmark
✅ 71 untouched benchmarks
⏩ 28 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ WallTime revalidate_shared 328.9 ms 81.7 ms ×4

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing charlie/derive-cache-record-serialize (0b2bb0b) with main (831a46a)2

Open in CodSpeed

Footnotes

  1. 28 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on charlie/remove-hash-digest-wire (077598c) during the generation of this report, so main (831a46a) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

charliermarsh added a commit that referenced this pull request Oct 1, 2026
We revert the cache-format stack so `main` retains the 0.12 cache
formats and bucket versions. These changes are deferred to 0.13.

This reverts the following PRs together, including the six cache bucket
bumps and the serialization and Windows lock-name changes that depend on
them:

- #22052: Refresh HTTP cache policies in place
- #22059: Store source distribution revision IDs inline
- #22060: Remove the legacy hash digest cache representation
- #22061: Derive serialization for cached artifact records
- #22062: Use bounded wheel cache lock names on Windows
- #22078: Pack HTTP cache policy flags and optional integers
- #22079: Align cached HTTP policies within the payload buffer
charliermarsh added a commit that referenced this pull request Oct 1, 2026
Reapplies #22061 for 0.13.

We derive `Serialize` for `Revision` and `Archive`, writing MessagePack
arrays instead of maps. This removes the custom serializers and saves 15
bytes per source revision and 32 bytes per wheel archive record.

The `sdists-v10` and `wheels-v7` bumps remove the need to support older
readers that cannot accept the added `size` field.
zanieb pushed a commit that referenced this pull request Oct 7, 2026
Reapplies #22061 for 0.13.

We derive `Serialize` for `Revision` and `Archive`, writing MessagePack
arrays instead of maps. This removes the custom serializers and saves 15
bytes per source revision and 32 bytes per wheel archive record.

The `sdists-v10` and `wheels-v7` bumps remove the need to support older
readers that cannot accept the added `size` field.
zanieb pushed a commit that referenced this pull request Oct 9, 2026
Reapplies #22061 for 0.13.

We derive `Serialize` for `Revision` and `Archive`, writing MessagePack
arrays instead of maps. This removes the custom serializers and saves 15
bytes per source revision and 32 bytes per wheel archive record.

The `sdists-v10` and `wheels-v7` bumps remove the need to support older
readers that cannot accept the added `size` field.
astral-automations-bot Bot pushed a commit to astral-sh/uv-dev that referenced this pull request Oct 10, 2026
Reapplies astral-sh#22061 for 0.13.

We derive `Serialize` for `Revision` and `Archive`, writing MessagePack
arrays instead of maps. This removes the custom serializers and saves 15
bytes per source revision and 32 bytes per wheel archive record.

The `sdists-v10` and `wheels-v7` bumps remove the need to support older
readers that cannot accept the added `size` field.

This branch was previously deployed

1 inactive deployment
automations — 0b2bb0bf Deployed Sep 30, 2026 by charliermarsh via review / security review #48412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址