Review main Abandoned

91924[TASK] Improve performance of cache warmup for translation files

Ayke Halder CR 0 V 0 Normal +62 −15 updated 12/16/25, 19:40

Commit message

This reduces the time for running `typo3 cache:warmup --group system`
from 70 seconds to 7 seconds.
(After flushing cache by running `typo3 cache:flush --group system`.)

Before `Symfony\Component\Translation\Translator::doLoadCatalogue` was
triggered once every time for each translation file.

`Translator::doLoadCatalogue` then triggered
`Symfony\Component\Translation\MessageCatalogue::addCatalogue` in a
loop for all translations files which were already added.

For N translation files this resulted in N * N/2 calls of
`MessageCatalogue::addCatalogue`.
So for 220 translations files this resulted in 24,200 calls.
With this patch it is back to 220 calls.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Issues 3

Files 2

Review log 1016

  1. Ayke Halder uploaded patch set 1 11/27/25, 22:42

  2. Ayke Halder uploaded patch set 2 11/27/25, 22:48

  3. Ayke Halder updated the commit message in patch set 3 11/27/25, 22:50

  4. core-ci voted on patch set 1 V +1 11/27/25, 22:51 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91146

  5. core-ci voted on patch set 3 V +1 11/27/25, 23:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91149

  6. Ayke Halder commented on patch set 3 11/27/25, 23:01

    Before: ``` $ ddev exec time bin/typo3 cache:warmup --group system real 1m10.854s user 1m7.910s sys 0m2.936s ``` With patch: ``` $ ddev exec time bin/typo3 cache:warmup --group system real 0m5.794s user 0m5.012s sys 0m0.780s ```
  7. Ayke Halder commented on patch set 3 11/27/25, 23:04

    Reply

    All times are with cache flushed before running cache warmup. ``` $ ddev exec time bin/typo3 cache:flush --group system real 0m4.445s user 0m3.801s sys 0m0.630s```
  8. core-ci voted on patch set 2 V -1 11/28/25, 01:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91148

  9. Ayke Halder rebased onto patch set 4 V +1 11/28/25, 10:45

  10. core-ci voted on patch set 4 V +1 11/28/25, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91196

  11. Ayke Halder uploaded patch set 5 V +1 11/28/25, 11:49

  12. Ayke Halder uploaded patch set 6 11/28/25, 11:55

  13. core-ci voted on patch set 5 V +1 11/28/25, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91201

  14. core-ci voted on patch set 6 V +1 11/28/25, 12:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91202

  15. Ayke Halder marked it work in progress 12/02/25, 10:49

  16. Ayke Halder abandoned the change 12/16/25, 19:40

    in favour of 91947: [TASK] Manage localization fallback and load override files using Symfony Translator | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91947