Review main Merged

84387[TASK] Optimize PageContentFetchingProcessor

Benni Mack CR +2 V +2 Easy +43 −1 updated 06/01/24, 21:38

Commit message

This change adapts the newly introduced PageContentFetching
data processor, which reduces the number of SQL queries
for colPos entries that do not use the "slideMode" feature.

This means, that installations which use
- multiple colPos on one layout

will have 1 instead of "amountOfColPos" DB queries
for fetching all content of a page.

For colPos with a slide mode, the previous logic
still applies.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1012

  1. Benni Mack uploaded patch set 1 05/24/24, 22:26

  2. core-ci voted on patch set 1 V +1 05/24/24, 22:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58172

  3. Christian Kuhn voted on patch set 1 CR +1 V +1 05/27/24, 12:54

  4. Benjamin Franzke commented on patch set 1 CR -1 05/27/24, 13:12

    PageContentFetchingProcessor.php:75

    This `array_map` should just be ``` $allUsedColPositionsWithoutSlideMode = array_column($contentAreasWithoutSlideMode, 'colPos'); ```

    PageContentFetchingProcessor.php:82

    how do we ensure this never leads to an sql injection? We should probably explicitly use `array(intval(...), …)` udring the composition of this query (not in a preparatory loop, that's to easy to remove during a refactoring, which'd introduce a sql injection possibility).

    PageContentFetchingProcessor.php:85

    This variable is defined from the previous foreach loop above. As we are not using slide mode here, this shouldn't be used at all, but some constant i guess, or only `null`.
  5. Benjamin Franzke commented on patch set 1 05/27/24, 13:24

    PageContentFetchingProcessor.php:82

    This will create invalid SQL if the content area list witrhout slidemode is empty.
  6. Benjamin Franzke uploaded patch set 2 CR +1 V +1 05/27/24, 13:31

  7. Benjamin Franzke commented on patch set 2 05/27/24, 13:31

    PageContentFetchingProcessor.php:75 Reply

    Done

    PageContentFetchingProcessor.php:82 Reply

    Done

    PageContentFetchingProcessor.php:82 Reply

    Done

    PageContentFetchingProcessor.php:85 Reply

    Done
  8. core-ci voted on patch set 2 V +1 05/27/24, 13:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58349

  9. Stefan Bürk voted on patch set 2 CR +1 05/27/24, 14:07

  10. Stefan Bürk voted on patch set 2 V +1 05/27/24, 15:52

  11. Benni Mack voted on patch set 2 CR +2 V +2 06/01/24, 21:38

  12. Benni Mack merged patch set 3 06/01/24, 21:38