feat: add gzip compression and increase API page size#219
Open
christopherblaisdell wants to merge 2 commits intodanielcopper:mainfrom
Open
feat: add gzip compression and increase API page size#219christopherblaisdell wants to merge 2 commits intodanielcopper:mainfrom
christopherblaisdell wants to merge 2 commits intodanielcopper:mainfrom
Conversation
added 2 commits
April 5, 2026 16:38
- Add Accept-Encoding: gzip header to HTTP GET requests - Decompress gzip responses transparently in request() - Increase pagination limit from 50 to 250 for ROM list fetches - Reduces HTTP round-trips by ~5x for large platforms (e.g. Dreamcast 362 ROMs: 8 requests -> 2 requests) - Add tests for gzip decompression and Accept-Encoding header
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.
Summary
Adds HTTP gzip compression and increases the API pagination page size from 50 to 250, reducing the number of HTTP round-trips by ~5x for large platforms.
What changed
http.py - request()
library.py - pagination loops
test_http.py
Performance impact
Based on real Deck sync data (702 ROMs across 3 units):
Risk
Very low. Gzip decompression only activates when the server responds with \Content-Encoding: gzip\. If the server doesn't support compression, behavior is unchanged. Page size increase is well within RomM's API limits.