Review main Merged

96605[BUGFIX] Stop probing settings once the tree is empty

Wolfgang Klinger CR +2 V +2 Normal +167 −0 updated 10/22/26, 07:48

Commit message

SettingsFactory passes the definitions of all previously resolved
sets to every settings provider. Most sets have no settings.yaml,
so their SiteSettingsProvider holds an empty settings tree, yet
SiteSettingsProvider::getProvidedSettings() still checked every
accumulated definition key against it. The effort grows
quadratically with the number of sets and adds seconds to a
request with a cold cache when many sites and sets are involved.

The loop now stops as soon as the tree is empty. The result is
unchanged.

In a test with 200 sites, the time spent in this method dropped
from 1.4 s to 50 ms for map notation and 280 ms for tree notation.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 2

Files 2

Review log 1317

  1. Wolfgang Klinger uploaded patch set 1 10/11/26, 10:43

  2. core-ci voted on patch set 1 V +1 10/11/26, 10:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110846

  3. Wouter Wolters commented on patch set 1 CR +1 V +1 10/13/26, 17:33

    It works but maybe we can have this improvement in the ArrayUtility it self. Seems way faster that way and other can benefit too.
  4. Wouter Wolters commented on patch set 1 10/13/26, 17:50

  5. Wolfgang Klinger uploaded patch set 2 CR +1 V +1 10/14/26, 08:22

  6. Wolfgang Klinger commented on patch set 2 10/14/26, 08:23

    Thanks @typo3@wouterwolters.nl, agreed, the exception in isValidPath() should go, and your change is the right place for that. I measured both with 200 sites. Your change alone brings this method from 1.4 s to 0.7 s, because the loop still probes every definition for every set and site. The real cost is the loop, so I reduced this patch to one thing: stop as soon as the tree is empty. That gives 50 ms for map notation and 280 ms for tree notation on its own, about 170 ms for tree notation together with yours. The first-segment guard I had is gone, your change covers that. ArrayUtility is identical on 13.4 and 14.3, so yours can go to all three branches as well.
  7. Wouter Wolters voted on patch set 2 CR +1 V +1 10/14/26, 08:29

  8. core-ci voted on patch set 2 V +1 10/14/26, 08:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111056

  9. Oliver Klee voted on patch set 2 CR +1 V +1 10/21/26, 20:48

  10. Oli Bartsch commented on patch set 2 10/22/26, 06:40

    Not a priority bugfix.
  11. Wolfgang Klinger rebased onto patch set 3 CR +1 V +1 10/22/26, 06:42

  12. core-ci voted on patch set 3 V +1 10/22/26, 06:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112065

  13. Oli Bartsch uploaded patch set 4 V +1 10/22/26, 07:18

  14. Oli Bartsch commented on patch set 4 CR +1 V +1 10/22/26, 07:18

    Reply

    Done
  15. core-ci voted on patch set 4 V +1 10/22/26, 07:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112067

  16. Oli Bartsch voted on patch set 4 CR +2 V +2 10/22/26, 07:48

  17. Oli Bartsch merged patch set 5 10/22/26, 07:48