Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Stale Breaking

80187[!!!][TASK] Use php cache frontend for ClassSchema cache entries

Alexander Schnitzler CR 0 V -1 Normal +155 −65 updated 06/18/26, 23:05

Commit message

Instead of serializing a whole array of ClassSchema entities,
the ReflectionService does now require the PhpFrontend cache
which results in each ClassSchema entity being cached as single
file.

The behavior is changed because the reflection data can be huge
depending on the amount of classes whose information is gathered.
In case the cache grew to a size of 2MB, those 2MB had to be
loaded on each request.

With the current implementation, depending on the request, many
different files might be loaded, but the overall size of data that
is loaded on each request is lower. Except for a request that need
all cached data. That however, is highly unlikely.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 5
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/80187/5 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/80187/5 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Issues 1

Files 7

Review log 2025

  1. Alexander Schnitzler uploaded patch set 1 07/27/23, 13:41

  2. Alexander Schnitzler wrote 07/27/23, 13:41

    Topic set to extbase
  3. core-ci voted on patch set 1 V -1 07/27/23, 14:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44618

  4. Alexander Schnitzler uploaded patch set 2 V -1 07/28/23, 09:35

  5. core-ci voted on patch set 2 V -1 07/28/23, 09:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44662

  6. Alexander Schnitzler uploaded patch set 3 V -1 07/28/23, 10:13

  7. core-ci voted on patch set 3 V +1 07/28/23, 10:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44664

  8. Alexander Schnitzler uploaded patch set 4 V +1 07/28/23, 12:00

  9. core-ci voted on patch set 4 V +1 07/28/23, 12:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44669

  10. Alexander Schnitzler marked it ready for review 07/28/23, 12:08

  11. Oliver Klee commented on patch set 4 07/28/23, 12:50

    ReflectionService.php:42 Unresolved

    Can/Should the elements be `non-empty-string`?

    ReflectionService.php:95

    class-string
  12. Oliver Klee commented on patch set 4 07/28/23, 13:00

    And just so this doesn’t go missing: I think this approach really makes sense and is a good direction to go in! <3
  13. Christian Kuhn commented on patch set 4 07/28/23, 18:24

    unsure on this one, needs proper review and maybe detail discussion.
  14. Oliver Klee commented on patch set 4 08/07/23, 13:57

    Reply

    Done
  15. Oliver Klee voted on patch set 4 V +1 08/07/23, 13:58

  16. Oliver Klee commented on patch set 4 10/08/23, 13:34

    How should we proceed here?
  17. Simon Schaufelberger commented on patch set 4 01/25/24, 14:28

    Reply

    @git@alexanderschnitzler.de Will this make it for v13?
  18. Alexander Schnitzler commented on patch set 4 01/25/24, 14:39

    Reply

    Well, I don't see what I need to do here. From my perspective a core merger needs to review, +2 and merge. So, don't ask me, ask the gods. ;)
  19. Simon Schaufelberger commented on patch set 4 01/25/24, 15:30

    Reply Unresolved

    This will probably only be merged if there are no more unresolved comments. That is why I'm asking. Do you want to finish it so it can be merged?
  20. Stefan Bürk commented on patch set 4 01/26/24, 08:38

    TBH - not really sure about the impact splitting it or not, but at least there are questions open.

    ReflectionService.php:37 Unresolved

    Instead of a class internal state, would it not be possible to use a runtime cache beside the slower phpfrontend cache ?

    ReflectionService.php:44 Unresolved

    Do we really need this identifier cache ? it's neither serialized/deserialized and only used exactly once - if it's not in the internal (runtime cache) it's calculated one time per request based on the classname to check if it is in the slow filebased cache or create it and save it. No need to collect a long list of identifier mapping here. Or do I miss something ?

    ReflectionService.php:111 Unresolved

    Do we really need that identifier schema - or would be a generic "class-schema-" prefix sufficient along with the xxh3 hash value ? However, does not really harm.

    ReflectionService.php:134 Unresolved

    Does this class really needs to be serializable/deserializable ? There are no setter to set the needed values (cache service) again - or is the constructor missued and called manually after deserialization ?
  21. Alexander Schnitzler commented on patch set 4 01/31/24, 20:20

    Reply

    Well, 6 months ago I could have easily answered your question. Now, I neither found the time nor the will to dig into it super quick for 13. I'd say, someone should take over or we just abandon this patch. I don't have time for this, at all. And I won't have any free time anytime soon to be more active again.
  22. Simon Schaufelberger uploaded patch set 5 V +1 11/07/25, 17:22

  23. Simon Schaufelberger commented on patch set 4 11/07/25, 17:23

    ReflectionService.php:95 Reply

    Done
  24. core-ci voted on patch set 5 V -1 11/07/25, 17:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88661

  25. Christian Kuhn wrote 06/18/26, 23:05

    Removed cc Christian Kuhn.