Task #55052
closed
Use file_exists() instead of is_file()
Added by Oliver Hader almost 11 years ago.
Updated about 6 years ago.
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.
- Tracker changed from Bug to Task
- Status changed from New to Under Review
Tests on an uncached page showed an approx. 9% better performance.
But that depends on the system, files and TypoScripts of course.
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...
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..
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF