Skip to content

Align cached HTTP policies within the payload buffer - #22079

Merged
charliermarsh merged 1 commit into
charlie/compact-http-cache-policyfrom
charlie/align-http-cache-policy
Sep 30, 2026
Merged

charliermarsh merged 1 commit into
charlie/compact-http-cache-policyfrom
charlie/align-http-cache-policy

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

We align HTTP cache policies within the payload buffer and access them directly after validation, removing a separate allocation and copy from every cache read. Extracting the payload reuses the same allocation.

The file adds up to 15 bytes of padding, covered by the CRC32. Policy validation is restricted to its own slice, and refreshes retain the entry ID check before overwriting the policy.

@charliermarsh charliermarsh added the internal A refactor or improvement that is not user-facing label Sep 29, 2026
@charliermarsh
charliermarsh force-pushed the charlie/align-http-cache-policy branch from fa4874b to d57d28c Compare September 29, 2026 17:50
@charliermarsh
charliermarsh marked this pull request as ready for review September 29, 2026 17:50
@codspeed

codspeed Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 28 skipped benchmarks1


Comparing charlie/align-http-cache-policy (6d2c0b6) with charlie/compact-http-cache-policy (115b8f0)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/compact-http-cache-policy (a2e0171) during the generation of this report, so f5e1072 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@zanieb

zanieb commented Sep 29, 2026

Copy link
Copy Markdown
Member

internal not performance?

@charliermarsh charliermarsh added performance and removed internal A refactor or improvement that is not user-facing labels Sep 30, 2026
@charliermarsh
charliermarsh force-pushed the charlie/align-http-cache-policy branch from d57d28c to 6d2c0b6 Compare September 30, 2026 01:43
@charliermarsh
charliermarsh merged commit 06fdf0c into main Sep 30, 2026
110 of 114 checks passed
@charliermarsh
charliermarsh deleted the charlie/align-http-cache-policy branch September 30, 2026 02:07
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 #22079 for 0.13.

We align HTTP cache policies within the payload buffer and access them
directly after validation, removing a separate allocation and copy from
every cache read. Extracting the payload reuses the same allocation.

The file adds up to 15 bytes of padding, covered by the CRC32. Policy
validation is restricted to its own slice, and refreshes retain the
entry ID check before overwriting the policy.
zanieb pushed a commit that referenced this pull request Oct 7, 2026
Reapplies #22079 for 0.13.

We align HTTP cache policies within the payload buffer and access them
directly after validation, removing a separate allocation and copy from
every cache read. Extracting the payload reuses the same allocation.

The file adds up to 15 bytes of padding, covered by the CRC32. Policy
validation is restricted to its own slice, and refreshes retain the
entry ID check before overwriting the policy.
zanieb pushed a commit that referenced this pull request Oct 9, 2026
Reapplies #22079 for 0.13.

We align HTTP cache policies within the payload buffer and access them
directly after validation, removing a separate allocation and copy from
every cache read. Extracting the payload reuses the same allocation.

The file adds up to 15 bytes of padding, covered by the CRC32. Policy
validation is restricted to its own slice, and refreshes retain the
entry ID check before overwriting the policy.
astral-automations-bot Bot pushed a commit to astral-sh/uv-dev that referenced this pull request Oct 10, 2026
Reapplies astral-sh#22079 for 0.13.

We align HTTP cache policies within the payload buffer and access them
directly after validation, removing a separate allocation and copy from
every cache read. Extracting the payload reuses the same allocation.

The file adds up to 15 bytes of padding, covered by the CRC32. Policy
validation is restricted to its own slice, and refreshes retain the
entry ID check before overwriting the policy.

This branch was previously deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants