Files
romm/backend/handler/database
Spinnich c6c80d8239 perf(roms): resolve smart-collection membership in SQL, not Python
The detail response listed a ROM's smart collections by loading every
own/public smart collection and scanning its cached rom_ids list in
Python. rom_ids grows with library size, so this got heavier on large
libraries on every detail load.

Push containment + visibility into the query via the existing cross-DB
json_array_contains_value helper (JSON_CONTAINS on MariaDB/MySQL, @>/?
on Postgres), returning only the matching rows with id/name/is_public.
The schema mapper no longer filters, so smart_for_user becomes the plain
from_smart_collections mapping. Behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 14:57:43 +00:00
..
2025-09-04 11:17:00 -03:00
2026-03-12 23:02:12 -04:00
2026-04-06 22:29:55 -04:00
2026-07-21 08:09:40 -04:00
2026-07-19 22:59:37 -04:00