Skip to content

[Feature] An opt-out for the provider metadata blocks on GET /api/roms #5227

Description

@danielcopper

Is your feature request related to a problem? Please describe.

A companion app that mirrors a RomM library onto a device walks the whole library through GET /api/roms?platform_ids=…&limit=500&offset=… on its first sync and on every forced resync. It needs about 25 fields per ROM: the ids, names, fs_size_bytes, platform, regions, languages, revision, tags, rom_user, the two cover paths and five sub-fields of metadatum. Every item nevertheless carries the full provider metadata, and that is where the bytes are.

Measured on RomM 5.3.1, one page of 500 with with_char_index=false&with_filter_values=false:

page, uncompressed 7.9 MB
page, gzip on the wire 842 KB
server time per page ~0.9 s (median of 5 interleaved runs)
bytes per item median 12.6 KB, mean 15.8 KB, 87 keys
share of item bytes in provider blobs 81 %
heaviest keys merged_ra_metadata 32 %, ss_metadata 16 %, launchbox_metadata 13 %, igdb_metadata 12 %, sibling_roms 9 %
the same items without those keys 1.5 MB per page, median 3 KB per item

The existing opt-outs do not reach this: with_rom_id_index=false saves 25 KB per page (0.3 %), with_total=false nothing measurable, and a page of 100 takes ~0.16 s against ~0.9 s for 500, so the cost is per item rather than per request. Over a whole library that is roughly five bytes serialized on the server and parsed on the client for every one the client reads.

Describe the solution you'd like

One more opt-out in the family GET /api/roms already has (with_char_index, with_filter_values, with_rom_id_index, with_total): with_metadata=false (name yours), default true, which leaves the provider blocks off each item — the thirteen *_metadata objects, merged_ra_metadata, merged_screenshots and alternative_names — and, under the same switch or a second one, sibling_roms. metadatum and every flat field stay. Nothing changes for a caller that does not pass the flag, the v2 gallery included. #3781 and #4062 added opt-outs of the same shape for the id index and the count.

Describe alternatives you've considered

  • A fields= sparse-fieldset parameter: more general, but a different shape from the opt-outs the endpoint has, and harder to keep in step with the schema.
  • GET /api/roms/{id}/simple per ROM: the same SimpleRomSchema, so the same blobs, times the library.
  • Smaller pages or fewer requests on the client: measured, no effect, since the cost is per item.

Activity

  1. added a commit that references this issue on Oct 12, 2026
    b643a85
  2. andest01 commented on Oct 12, 2026

    @andest01
    Contributor

    @danielcopper see #5206 for additional ideas.

  3. added a commit that references this issue on Oct 12, 2026
    fef352d
  4. added theissue type on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions