Task #54525
closedEpic #55070: Workpackages
Epic #55065: WP: Overall System Performance (Backend and Frontend)
Story #55078: Optimize PHP code performance in TYPO3 methods
Optimize file- and path functions in GeneralUtility
100%
Description
- getFileAbsFileName()
- validPathStr()
- isAllowedAbsPath()
- verifyFilenameAgainstDenyPattern()
Updated by Gerrit Code Review almost 11 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/26505
Updated by Gerrit Code Review almost 11 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/26505
Updated by Gerrit Code Review almost 11 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/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Michiel Roos almost 11 years ago
I'll post some stats this evening.
These methods are being called a lot during the frontend rendering and backend rendering. Parsing and concatenating JS and CSS and generating cache files etc.
But to give you a rough impression. These are the current call counts for an uncached backend request (/typo3/backend.php), right after clearing all cache:
Times are inclusive wall time.
TYPO3\CMS\Core\Utility\GeneralUtility::isAllowedAbsPath - 2.267 calls - 364,98 ms TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr - 2.315 calls - 168,77 ms TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath - 4.598 calls - 77,33 ms TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath - 608 calls - 23,03 ms
The total wall time was 10,43 s here . . . mostly taken by file_put_contents(), rename(), chgrp() etc.
Reduction in call times with the patch:
TYPO3\CMS\Core\Utility\GeneralUtility::isAllowedAbsPath - 67,30 ms TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr - 9,19 ms TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath - 33,97 ms TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath - 2,32 ms
Updated by Michiel Roos almost 11 years ago
Here is a test for the isAbsPath function to get an impression: http://pastebin.com/0BqyVGrc
Updated by Ernesto Baschny almost 11 years ago
- Target version changed from next-patchlevel to 6.2.0
- Parent task set to #55078
Updated by Gerrit Code Review almost 11 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Gerrit Code Review almost 11 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26505
Updated by Michiel Roos almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e1781feb954fa9208c604928d0943e1373b2f11c.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed