77235[TASK] Use runtime cache in `PageRepository::getPageOverlaysForLanguage()`
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Georg Ringer +1
-
Verified V +2 Done
- Stefan Bürk +2
- Georg Ringer +1
- core-ci +1 CI
Issues 1
Files 1
Review log 2936
Show 711 earlier messages
-
Christoph Lehmann uploaded patch set 1 12/28/22, 15:25
-
core-ci voted on patch set 1 V -1 12/28/22, 15:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35377
-
Christoph Lehmann marked it work in progress 12/28/22, 17:25
-
Christoph Lehmann uploaded patch set 2
V -112/28/22, 21:05 -
core-ci voted on patch set 2 V -1 12/28/22, 21:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35380
-
Christoph Lehmann uploaded patch set 3
V -112/29/22, 20:13 -
core-ci voted on patch set 3 V +1 12/29/22, 20:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35395
-
Christoph Lehmann updated the commit message in patch set 4
V +112/29/22, 20:23 -
Christoph Lehmann marked it ready for review 12/29/22, 20:23
-
Christoph Lehmann commented on patch set 4 12/29/22, 20:26
In my test with a ~50 pages sitemap the amount of queries went down from 486 to 325 -
core-ci voted on patch set 4 V +1 12/29/22, 20:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35396
-
Benni Mack voted on patch set 4 CR +1 01/09/23, 14:06
-
Jörg Bösche voted on patch set 4 CR +1 01/11/23, 09:23
-
Christoph Lehmann uploaded patch set 5
CR +1V +101/17/23, 16:23 -
core-ci voted on patch set 5 V +1 01/17/23, 16:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35979
-
Benni Mack voted on patch set 5 V +1 CR +1 01/19/23, 16:52
-
Stefan Bürk voted on patch set 5 V +1 CR +1 01/19/23, 23:18
-
Georg Ringer commented on patch set 5 V -1 CR -1 01/20/23, 06:46
just tested it and if > $rows = $query->executeQuery()->fetchAllAssociative(); returns an empty row, the query is still always called because "if ($cacheEntry) {" will be triggered with empty array AND false -
Christoph Lehmann uploaded patch set 6
CR +1V +101/20/23, 10:29 -
Stefan Bürk commented on patch set 5 V 0 CR 0 01/20/23, 10:32
Maybe we should think about dropping the backport here. Backport needs quite some side changes, as the array chunking stuff has not been backported as it seems. How should we proceed there with the backport ? Would say let''s drop it. If it works out we can do a complete dedicated backport later ?Reply
good catch. Should be an `is_array($cacheEntry)` here. -
Stefan Bürk commented on patch set 6 01/20/23, 10:32
Reply
unresolve ;) -
core-ci voted on patch set 6 V +1 01/20/23, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36321
-
Christoph Lehmann commented on patch set 6 01/20/23, 11:44
Reply
It's fine for me, I will care about and provide it later.Reply
Done -
Andreas Kienast commented on patch set 6 01/20/23, 13:30
PageRepository.php:591I guess this could be shortened to ``` if (($rows = $this->getRuntimeCache()->get($cacheIdentifier)) === false) { $rows = $query->executeQuery()->fetchAllAssociative(); $this->getRuntimeCache()->set($cacheIdentifier, $rows); } ``` -
Stefan Bürk commented on patch set 6 01/20/23, 13:41
PageRepository.php:591Replywould not do the assignment in the condition. But you are right, but would rework it more like that - what do you think ? ``` $cacheIdentifier = 'PageRepository_getPageOverlaysForLanguage_' . hash('xxh3', $query->getSQL() . json_encode($query->getParameters())); $rows = $this->getRuntimeCache()->get($cacheIdentifier); if (!is_array($rows)) { $rows = $query->executeQuery()->fetchAllAssociative(); $this->getRuntimeCache()->set($cacheIdentifier, $rows); } ``` -
Andreas Kienast commented on patch set 6 01/20/23, 13:57
PageRepository.php:591ReplyLooks fine to me. -
Andreas Kienast uploaded patch set 7
V +101/20/23, 14:16 -
Andreas Kienast commented on patch set 7 01/20/23, 14:17
PageRepository.php:591ReplyDone -
Stefan Bürk voted on patch set 7 V +1 CR +1 01/20/23, 14:21
-
Christoph Lehmann commented on patch set 7 01/20/23, 14:36
Please wait with merge. -
core-ci voted on patch set 7 V +1 01/20/23, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36368
-
Georg Ringer voted on patch set 7 V +1 CR +1 01/20/23, 20:24
-
Stefan Bürk commented on patch set 7 CR -1 01/20/23, 21:16
Reply
Find, but can you enlight us, why ? What are we/I missing ? (Temp -1 for that reason) -
Christoph Lehmann commented on patch set 7 01/22/23, 19:41
Reply
Sure. I re-checked its benefit in combination with * https://review.typo3.org/c/Packages/TYPO3.CMS/+/77387 * https://review.typo3.org/c/Packages/TYPO3.CMS/+/77484 * https://review.typo3.org/c/Packages/TYPO3.CMS/+/77519 and came to the conclusion that the benefit is there. Interestingly I saw a lower memory peak WITH this change while rendering a sitemap menu. Together with that, the description in this issue is still valid, so please, let's merge it. -
Stefan Bürk voted on patch set 7 V +2 CR +2 01/22/23, 21:07
-
Stefan Bürk merged patch set 8 01/22/23, 21:07