Task #55052
Use 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.
Associated revisions
[TASK] Use file_exists() instead of is_file()
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.
Resolves: #55052
Releases: 6.2
Change-Id: I57b6d2f68dd3c1c45b603c3f194cc0c53c48e28c
Reviewed-on: https://review.typo3.org/26872
Reviewed-by: Wouter Wolters
Reviewed-by: Tom Ruether
Tested-by: Tom Ruether
Reviewed-by: Oliver Klee
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
History
#1
Updated by Oliver Hader almost 6 years ago
- Tracker changed from Bug to Task
#2
Updated by Gerrit Code Review almost 6 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
#3
Updated by Oliver Hader almost 6 years ago
Tests on an uncached page showed an approx. 9% better performance.
But that depends on the system, files and TypoScripts of course.
#4
Updated by Oliver Hader almost 6 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...
#5
Updated by Oliver Hader almost 6 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..
#6
Updated by Oliver Hader almost 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 956c2fef79c267b4ad903468bfc4afbc7c8f0a5a.
#7
Updated by Benni Mack about 1 year ago
- Status changed from Resolved to Closed