Task #90104
closedIntroduce prepared statement for BackendUtility::getPageForRootline
100%
Description
This function is called a lot, hence the DB statement should be reused.
Updated by Gerrit Code Review almost 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62867
Updated by Markus Klein almost 5 years ago
- Related to Epic #88474: Page tree performance in 9.5 added
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62867
Updated by Gerrit Code Review almost 5 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62873
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62873
Updated by Gerrit Code Review almost 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62873
Updated by Gerrit Code Review almost 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62867
Updated by Gerrit Code Review almost 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62902
Updated by Markus Klein almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cd0c343a0e103421deca8879abca28744d5c68a4.
Updated by Wolfgang Klinger almost 5 years ago
This introduces a big (at least for me) regression, as the 'additionalFields' are not taken into account here!
So it's impossible to fetch a rootline with any other fields than the default fields hardcoded in the class.
Updated by Markus Klein almost 5 years ago
@Wolfgang Podbregar: Can you please explain why this change should be responsible? I did not change the query itself.
Updated by Wolfgang Klinger almost 5 years ago
$statement = $runtimeCache->get('getPageForRootlineStatement');
statement is fetched without taking the additionalFields into account.
So when it's cached once, you can pass whatever additionalFields parameter you want, you'll always only get an array of the hardcoded fields of the first call.
So imho this
$statement = $runtimeCache->get('getPageForRootlineStatement');
should be (only drafted quickly):
$statement = $runtimeCache->get('getPageForRootlineStatement' . md5(implode(',', $additionalFields)));
and
$runtimeCache->set('getPageForRootlineStatement' . md5(implode(',', $additionalFields)), $statement);
Updated by Markus Klein almost 5 years ago
- Related to Bug #90434: getPageForRootline() caches the SQL statement too greedy added
Updated by Georg Ringer over 4 years ago
- Related to Bug #90535: 10.3.0 throws PHP Warning: mysqli_stmt::bind_param(): Couldn't fetch mysqli_stmt in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 236 added
Updated by Markus Klein over 4 years ago
- Related to Bug #91206: PDOException "You cannot serialize or unserialize PDOStatement instances" in PopulatePageSlugs wizard added