Review main Abandoned

77194[BUGFIX] Reduce sql queries for page link generation

Benni Mack CR 0 V 0 Normal +144 −6 updated 01/09/23, 22:40

Commit message

Generating a page link leads to 2 sql queries.

The first query is about a general lookup and frontend group access
check. The second occurs through PageRouter::generateUri().

By passing a fully resolved and possibly overlayed page record to
generateUri() instead of a pageId the second query can be omitted.

Since generateUri() is public we need to make sure the page record is
completely resolved and overlayed in order to reuse it. This is done with
a "Page" object which also separates real properties and special
properties now.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 5

Review log 58

  1. Benni Mack uploaded patch set 1 12/21/22, 11:07

  2. core-ci voted on patch set 1 V -1 12/21/22, 12:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35267

  3. Benni Mack uploaded patch set 2 V -1 12/21/22, 15:43

  4. core-ci voted on patch set 2 V -1 12/21/22, 15:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35276

  5. Benni Mack uploaded patch set 3 V -1 12/21/22, 15:57

  6. core-ci voted on patch set 3 V +1 12/21/22, 16:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35278

  7. Christoph Lehmann commented on patch set 3 12/21/22, 21:50

    I Like it. Much cleaner than my approach.

    Page.php:58 Unresolved

    function not used, yet.

    PropertyTrait.php:28 Unresolved

    empty line after this.

    PageRouter.php:245 Unresolved

    Change comment to "Check 3rd party input $route for basic requirements" ?
  8. Benni Mack abandoned the change 01/09/23, 22:40