Review main Merged

85374[TASK] Use recursive common table expressions in RootlineUtility

Stefan Bürk CR +2 V +2 Hard +703 −37 updated 07/31/24, 11:57

Commit message

The patch implements a first use of a recursive
common table expression ("CTE" / "WITH RECURSIVE").

The target of this first CTE is RootlineUtility.
RootlineUtility tends to execute many single queries,
especially in the Frontend with not fully cached
page requests.

The job of RootlineUtility->get() is to find the path
of a page up to its tree root.

While a basic CTE to solve this recursively with a
single query is relatively straight forward, the
true magic unfolds when workspace overlays are
taken into account: The final query is very
efficient, but far from trivial and nothing for the
faint of heart. Note this CTE is capable of resolving
workspace scenarios with one query, but language overlay
scenarios are not yet implemented.

Core v13 already improved RootlineUtility test coverage
with previous patches, and a lot of functional patches
indirectly test rootline determination as well. All in
all, we are confident this CTE solution works well.

With given solution, the number of queries already
shrinks quite significantly, currently up to 1/4.
Note this patch is the first one in this direction:
There are further possible optimization steps, patches
dealing with more details will follow.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 3162

Show 2037 earlier messages
  1. Stefan Bürk uploaded patch set 1 07/25/24, 10:27

  2. Stefan Bürk rebased onto patch set 2 07/25/24, 10:44

  3. core-ci voted on patch set 1 V -1 07/25/24, 10:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62171

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

  5. Stefan Bürk uploaded patch set 3 V -1 07/25/24, 14:13

  6. core-ci voted on patch set 3 V -1 07/25/24, 14:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62195

  7. Stefan Bürk uploaded patch set 4 V -1 07/25/24, 14:57

  8. core-ci voted on patch set 4 V -1 07/25/24, 15:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62197

  9. Stefan Bürk uploaded patch set 5 V -1 07/25/24, 15:09

  10. core-ci voted on patch set 5 V +1 07/25/24, 15:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62198

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

  12. Stefan Bürk uploaded patch set 6 V -1 07/25/24, 17:43

  13. core-ci voted on patch set 6 V +1 07/25/24, 17:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62208

  14. Stefan Bürk uploaded patch set 7 V +1 07/25/24, 18:59

  15. core-ci voted on patch set 7 V +1 07/25/24, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62222

  16. Stefan Bürk wrote 07/25/24, 19:16

    Topic set to cte
  17. Stefan Bürk rebased onto patch set 8 V +1 07/26/24, 08:08

  18. core-ci voted on patch set 8 V +1 07/26/24, 08:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62260

  19. Stefan Bürk uploaded patch set 9 V +1 07/26/24, 09:17

  20. core-ci voted on patch set 9 V +1 07/26/24, 09:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62262

  21. Christian Kuhn commented on patch set 9 07/26/24, 11:35

    RootlineUtility.php:446

    should be kept - you are not setting the persisted cache_rootline anymore.
  22. Stefan Bürk uploaded patch set 10 V +1 07/27/24, 15:02

  23. core-ci voted on patch set 10 V +1 07/27/24, 15:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62300

  24. Stefan Bürk uploaded patch set 11 V +1 07/27/24, 16:45

  25. Stefan Bürk commented on patch set 11 07/27/24, 16:46

    RootlineUtility.php:446 Reply

    Done
  26. core-ci voted on patch set 11 V -1 07/27/24, 16:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62311

  27. Stefan Bürk uploaded patch set 12 V -1 07/27/24, 17:39

  28. core-ci voted on patch set 12 V +1 07/27/24, 17:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62313

  29. Stefan Bürk uploaded patch set 13 V +1 07/27/24, 23:53

  30. core-ci voted on patch set 13 V -1 07/28/24, 00:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62324

  31. Stefan Bürk rebased onto patch set 14 V -1 07/28/24, 01:40

  32. core-ci voted on patch set 14 V +1 07/28/24, 01:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62330

  33. Stefan Bürk uploaded patch set 15 V +1 07/28/24, 01:57

  34. core-ci voted on patch set 15 V +1 07/28/24, 02:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62331

  35. Stefan Bürk uploaded patch set 16 V +1 07/28/24, 02:25

  36. core-ci voted on patch set 16 V +1 07/28/24, 02:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62333

  37. Stefan Bürk uploaded patch set 17 V +1 07/28/24, 02:43

  1. core-ci voted on patch set 17 V +1 07/28/24, 02:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62334

  2. Stefan Bürk rebased onto patch set 18 V +1 07/29/24, 21:48

  3. core-ci voted on patch set 18 V +1 07/29/24, 21:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62401

  4. Stefan Bürk rebased onto patch set 19 07/30/24, 07:15

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  5. core-ci voted on patch set 19 V +1 07/30/24, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62418

  6. Stefan Bürk uploaded patch set 20 V +1 07/30/24, 09:45

  7. core-ci voted on patch set 20 V -1 07/30/24, 09:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62422

  8. Stefan Bürk rebased onto patch set 21 V -1 07/30/24, 13:32

  9. core-ci voted on patch set 21 V -1 07/30/24, 13:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62446

  10. Stefan Bürk uploaded patch set 22 V -1 07/31/24, 09:00

  11. core-ci voted on patch set 22 V -1 07/31/24, 09:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62505

  12. Stefan Bürk uploaded patch set 23 V -1 07/31/24, 09:22

  13. core-ci voted on patch set 23 V +1 07/31/24, 09:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62509

  14. Christian Kuhn uploaded patch set 24 V +1 07/31/24, 10:09

  15. core-ci voted on patch set 24 V +1 07/31/24, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62513

  16. core-ci voted on patch set 24 V -1 07/31/24, 10:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62514

  17. core-ci commented on patch set 24 07/31/24, 11:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62514

  18. Christian Kuhn uploaded patch set 25 V -1 07/31/24, 11:19

  19. core-ci voted on patch set 24 V -1 07/31/24, 11:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62514

  20. core-ci voted on patch set 25 V -1 07/31/24, 11:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62527

  21. core-ci voted on patch set 25 V +1 07/31/24, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62528

  22. core-ci commented on patch set 25 07/31/24, 11:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62527

  23. Christian Kuhn voted on patch set 25 CR +2 V +2 07/31/24, 11:52

  24. Andreas Kienast voted on patch set 25 CR +1 V +1 07/31/24, 11:56

  25. Stefan Bürk merged patch set 26 07/31/24, 11:57