Review main Merged

91849[BUGFIX] Improve PageContext middleware performance

Oli Bartsch CR +2 V +2 Hard +185 −105 updated 11/24/25, 16:19

Commit message

Only initialize PageContext for routes that actually need it:
- Modules with page tree navigation component
- Routes with 'requestPageContext' option

This significantly reduces overhead for AJAX requests,
and other backend operations that don't require PageContext.

Additionally, PageContextFactory is adjusted to
no longer generate fake records for pid=0
scenarios.

Review

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

Issues 1

Files 8

Review log 912

  1. Oli Bartsch uploaded patch set 1 11/24/25, 10:12

  2. core-ci voted on patch set 1 V -1 11/24/25, 10:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90816

  3. Oli Bartsch uploaded patch set 2 V -1 11/24/25, 11:22

  4. core-ci voted on patch set 2 V +1 11/24/25, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90823

  5. Benjamin Kott commented on patch set 2 CR +1 V +1 11/24/25, 13:19

    PageContextFactory.php:97

    I still think there should not be created a PageContext with fake information here, because it cannot exist. But i am fine with going for it right now, as the importance of the performance improvements is higher than debating this. But it should be addressed in future patches.
  6. Oli Bartsch uploaded patch set 3 CR +1 V +1 11/24/25, 15:39

  7. Oli Bartsch commented on patch set 3 11/24/25, 15:46

    PageContextFactory.php:97 Reply

    I've resolved this issue now.
  8. core-ci voted on patch set 3 V +1 11/24/25, 15:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90858

  9. Sven Liebert voted on patch set 3 CR +1 V +1 11/24/25, 15:58

  10. Benjamin Kott voted on patch set 3 CR +1 V +1 11/24/25, 16:17

  11. Oli Bartsch voted on patch set 3 CR +2 V +2 11/24/25, 16:19

  12. Oli Bartsch merged patch set 4 11/24/25, 16:19