Files
romm/backend/endpoints/responses
Claude 5adffeca71 perf(roms): skip rom_files load on gallery list endpoint
The gallery list endpoint was eager-loading every rom_file row for each
paginated ROM via selectinload, then re-joining each row back to its
parent rom for the is_top_level computation. For platforms with extracted
multi-file ROMs (Xbox 360 ~1394 files/ROM, Switch ~199 files/ROM), this
made /api/roms time out at 120s even with a rom_id index.

Cards never displayed individual files — only the has_simple_single_file
/ has_nested_single_file / has_multiple_files booleans that derive from
the file list. Denormalize the underlying state onto roms as multi_file
(folder-based vs single-file) and top_level_file_count, recompute the
booleans from those columns, drop the selectinload from filter_roms, and
move the files field from SimpleRomSchema to DetailedRomSchema so the
gallery payload no longer ships file rows.

Also drop the redundant joinedload(RomFile.rom) and switch the relation
to lazy="select" so subsequent file.rom accesses resolve from the
session identity map instead of re-JOINing the parent rom per file row.

ShowQRCode.vue's folder-based DS/3DS fallback now fetches the detailed
rom on demand, since SimpleRom no longer carries files.
2026-05-24 15:02:02 +00:00
..
2026-03-15 09:48:31 -04:00
2026-03-15 09:48:31 -04:00
2026-03-15 09:48:31 -04:00
2026-03-15 09:48:31 -04:00
2026-04-05 23:15:42 -04:00
2026-02-10 08:56:30 -05:00
2026-03-15 09:48:31 -04:00
2026-03-12 23:02:12 -04:00
2026-04-12 11:04:12 -04:00
2026-04-07 09:04:13 -04:00
2026-04-06 21:32:13 -04:00
2025-10-15 16:21:17 -04:00