Skip to content

Avoid duplicate package decodes for deprecation badges#492

Merged
thomashoneyman merged 1 commit into
masterfrom
deprecation-marker
Jul 6, 2026
Merged

Avoid duplicate package decodes for deprecation badges#492
thomashoneyman merged 1 commit into
masterfrom
deprecation-marker

Conversation

@thomashoneyman

@thomashoneyman thomashoneyman commented Jul 6, 2026

Copy link
Copy Markdown
Member

When accessing any version of a package except the latest we are decoding it twice — once to figure out if it's deprecated, and again to render the docs.

With this change we only ever have to decode once, by:

  • replace latest-package decoding in package page handlers with a version-stamped deprecation marker
  • keep latest-version pages on the existing single-decode path
  • treat missing, stale, malformed, or unreadable markers as cache misses and recompute

Manually verified with an old Deku version and the page cache cleared; without the marker we measure a 1.07s, and with the marker at 0.47s.

@thomashoneyman thomashoneyman merged commit 9bb6d14 into master Jul 6, 2026
2 checks passed
@thomashoneyman thomashoneyman deleted the deprecation-marker branch July 6, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant