mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
The paginated ROM list eager-loaded sibling_roms via selectinload, which hydrated full Rom ORM instances (including heavy JSON metadata columns) for every sibling even though only an existence/count check was needed on the frontend. On large collections this dominated request latency. Split sibling handling by response shape: - SimpleRomSchema (list): siblings is now list[int]; populated per page by a single SELECT against the sibling_roms view projecting only (rom_id, sibling_rom_id) — no Rom row hydration. - DetailedRomSchema (detail): keeps full SiblingRomSchema objects, with load_only on (id, name, fs_name_no_tags, fs_name_no_ext) so sibling rows stop dragging in JSON metadata. Frontend usage already only consumes siblings.length on list views; the detail-page VersionSwitcher continues to receive the richer schema.