mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
* fix(collections): project identifier columns instead of loading whole collections `GET /api/collections/identifiers` reads only ids, owners and visibility, but the accessor it called eagerly loaded every rom of every collection (`@with_roms`) and built a full `User` per row (`Collection.user` is `lazy="joined"`). A column projection drops both, while `load_only` cannot cancel either one. Measured on a seeded database of 100 collections and 200 roms (20,000 memberships): rows read 20,100 to 100, statements 2 to 1, SQL text 1,172 to 113 bytes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * test(collections): keep the new identifier assertions to one-line comments The repo caps comments at one line when the rationale is not recoverable from the code, and test docstrings at one sentence, so the m2m reasoning belongs in the PR body rather than repeated at the call sites. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>