Repository navigation
Conversation
CollectionVersion carries large JSON columns (docs_blob, files, manifest, contents) that most listing responses never render. Loading them for every row dominated memory and time when listing collection versions. Defer the large fields in the viewsets that serve them, keep the serializer redaction in sync with the request's field selection instead of only checking whether fields or exclude_fields is present, treat HEAD like GET, and only prefetch artifacts when a checksum field is rendered. The galaxy v3 list, unpaginated and docs endpoints defer the fields they do not return. Co-Authored-By: Claude Code <noreply@anthropic.com>
pablomh
force-pushed
the
collection-version-listing-perf
branch
from
November 12, 2026 11:42
86fde34 to
dd1095d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CollectionVersioncarries large JSON columns (docs_blob,files,manifest,contents) that most listing responses never render. The serializer redacts them for GET, but the ORM still selects and deserializes them, so every list request pays for the full payload.Measured on a 672-row page: the queryset alone peaks at 2,319 MB with all columns and 150 MB when the large fields are deferred. On a
?limit=2000request the API worker peaked at 4,300-7,300 MB and was OOM-killed, returning a 502 to the caller; after the change it peaks at 191 MB, with a byte-identical response.Change
fields/exclude_fieldssemantics as the serializer (repeated parameters, configurable argument names and delimiter, empty values).HEADlikeGET.Companion change, independent of this one: #2733.
🤖 Generated with Claude Code