Review main Merged

96336[TASK] Avoid refetching frontend file references

Wouter Wolters CR +2 V +2 Normal +202 −4 updated 10/15/26, 22:36

Commit message

Frontend file relations are loaded by selecting reference IDs and
then fetching each reference record separately.

Select complete rows for live frontend requests and pass them to
ResourceFactory, avoiding the extra query for each reference. The
factory still reuses cached objects, and visibility checks and
sorting are preserved. Backend requests and workspace previews keep
the existing lookup path so workspace overlays continue to apply.

For 20 uncached references, reference queries drop from 21 to one.
The time to load those references on PHP 8.5 changes as follows:

    Database       Before       After
    SQLite         1.49 ms      0.18 ms
    MariaDB 11.8  11.49 ms      1.13 ms

The benefit is in the initial loading of references. When the
objects are already cached, fetching complete rows adds temporary
memory and about 36-65 us for this 20-reference workload.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1317

  1. Wouter Wolters uploaded patch set 1 10/02/26, 20:55

  2. Wouter Wolters updated the commit message in patch set 2 10/09/26, 18:40

  3. Wouter Wolters rebased onto patch set 3 10/09/26, 18:40

  4. Wouter Wolters wrote 10/09/26, 18:40

    Unset private
  5. Wouter Wolters marked it ready for review 10/09/26, 18:40

  6. core-ci voted on patch set 3 V +1 10/09/26, 18:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110685

  7. Benni Mack commented on patch set 3 CR -1 10/10/26, 06:32

    FileRepository.php:93

    we also have an incoming $workspaceId. I think we need to take it into account as well.
  8. Wouter Wolters uploaded patch set 4 CR -1 V +1 10/10/26, 18:31

  9. Wouter Wolters updated the commit message in patch set 5 10/10/26, 18:31

  10. core-ci voted on patch set 4 V -1 10/10/26, 18:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110810

  11. core-ci voted on patch set 5 V -1 10/10/26, 18:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110811

  12. Wouter Wolters uploaded patch set 6 V -1 10/10/26, 19:36

  13. core-ci voted on patch set 6 V +1 10/10/26, 19:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110818

  14. Wouter Wolters commented on patch set 6 10/13/26, 17:15

    FileRepository.php:93 Reply

    Done
  15. Oliver Klee voted on patch set 6 CR +1 V +1 10/14/26, 10:05

  16. Benni Mack voted on patch set 6 CR +2 V +2 10/15/26, 22:36

  17. Benni Mack merged patch set 7 10/15/26, 22:36