Bug #43540
closedTask #52304: Performance issues
TS is fetched from cache incorrectly sometimes
100%
Description
If $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_constants']
or $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup']
are set in the Install tool, cached TS will not be found in cache. This would result in TS parsing every time when there are USER_INT objects on the page. Generally it will slow down the page with USER_INT objects by at least 300% comparing to the non-cached version.
More information
When template parser processes the TS, it makes a hash to load a cached version of TS:
$this->runThroughTemplates($theRootLine); ... $rowSumHash = md5('ROWSUM:' . serialize($this->rowSum)); $result = \TYPO3\CMS\Frontend\Page\PageRepository::getHash($rowSumHash);
There TS can be fetched from the cache. If nothing is returned, the TS is parsed and stored into the cache:
$this->generateConfig(); ... $rowSumHash = md5('ROWSUM:' . serialize($this->rowSum)); \TYPO3\CMS\Frontend\Page\PageRepository::storeHash($rowSumHash, serialize($cc['all']), 'TMPL_CONDITIONS_ALL');
Function generateConfig()
prepends values from the above-mentioned variables before processing the data. The earlier called function runThroughtTemplates()
does not do that. If the variables are empty, it does not make any difference and everything is cached. But if those variables are not empty (even if there is a single space), the $this->rowSum will be different in two quoted code extracts above. Thus TS will be stored with one hash value and the next request will try to retrieve it with another hash value. This means that cached TS will never be retrieved and will be always parsed.
We were able to decrease page generation from 2.88s to 0.8s by fixing the issue. 2 seconds make a huge difference in speed and load of the web server.
Updated by Dmitry Dulepov almost 12 years ago
Should be read: "...comparing to the cached version".
Updated by Gerrit Code Review almost 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16939
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16939
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18056
Updated by Dmitry Dulepov over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 10 to 100
Applied in changeset 4fbb2b5852a98b1eb3e935d79d612468896291f1.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18059
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/18061
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18059
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/18062
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18621
Updated by Gerrit Code Review over 11 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Gerrit Code Review over 11 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Markus Klein almost 11 years ago
- Parent task set to #52338
- Is Regression set to No
Updated by Markus Klein almost 11 years ago
- Parent task changed from #52338 to #52304
Updated by Kasper Ligaard almost 11 years ago
This solves the problem described in this thread: http://forum.typo3.org/index.php/m/695487/#page_top
Updated by Gerrit Code Review almost 11 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18072
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/24177
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/24178
Updated by Dmitry Dulepov almost 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset 8e1ea8886d8e83272e36000d0a7a1bc31fde206d.
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/24182
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/24981
Updated by Jigal van Hemert almost 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset f8f155e51465551681e5e14c5f16f8a7e719d9d4.
Updated by Simon Schaufelberger almost 11 years ago
Hey, Why is this NOT included in 4.5??? so sad...
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed