Task #55052
closedUse file_exists() instead of is_file()
100%
Description
is_file() checks whether a resource exists and whether it is actually a file.
There are several parts in the core, where it is sufficient to check for the existence only, which is faster.
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/26872
Updated by Oliver Hader almost 11 years ago
Tests on an uncached page showed an approx. 9% better performance.
But that depends on the system, files and TypoScripts of course.
Updated by Oliver Hader almost 11 years ago
Possibly there's a rewrite for TYPO3\CMS\Core\Resource\ResourceFactory::retrieveFileOrFolderObject() as well...
I'm did not test, whether is_dir() might be faster here...
Updated by Oliver Hader almost 11 years ago
Oliver Hader wrote:
Possibly there's a rewrite for TYPO3\CMS\Core\Resource\ResourceFactory::retrieveFileOrFolderObject() as well...
I'm did not test, whether is_dir() might be faster here...
Obviously that does not help..
Updated by Oliver Hader almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 956c2fef79c267b4ad903468bfc4afbc7c8f0a5a.