Skip to content

Skip unused release histories in PyPI and Pub package lookups - #88

Merged
andrew merged 1 commit into
mainfrom
perf/package-metadata-decoding
Sep 14, 2026
Merged

andrew merged 1 commit into
mainfrom
perf/package-metadata-decoding

Conversation

@andrew

@andrew andrew commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Decode only package metadata for PyPI and Pub lookups, skipping unused release histories. For fixtures with 500 releases, this reduces allocated bytes by 64% for PyPI and 75% for Pub.

Package lookups now ignore invalid field types in unused release histories. Malformed JSON and invalid package metadata still fail, and full version listings retain their existing decoding behavior.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved blocking issues were identified.

Pull request overview

Optimizes PyPI and Pub metadata lookups by skipping unused release histories while preserving full version-listing behavior.

Changes:

  • Adds minimal response types for metadata lookups.
  • Adds decoding-error and allocation coverage.
  • Retains full release-history decoding for version listings.
File summaries
File Description
package_metadata_test.go Tests metadata decoding, error handling, and performance.
internal/pypi/pypi.go Skips PyPI release-history decoding for metadata lookups.
internal/pub/pub.go Skips Pub version-history decoding for metadata lookups.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andrew
andrew merged commit 238647a into main Sep 14, 2026
6 checks passed
@andrew
andrew deleted the perf/package-metadata-decoding branch September 14, 2026 12:16
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.

2 participants