Project

General

Profile

Actions

Task #55052

closed

Use file_exists() instead of is_file()

Added by Oliver Hader almost 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2014-01-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

Updated by Oliver Hader almost 11 years ago

  • Tracker changed from Bug to Task
Actions #2

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

Actions #3

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.

Actions #4

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...

Actions #5

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..

Actions #6

Updated by Oliver Hader almost 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF