Project

General

Profile

Actions

Bug #53962

closed

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Bug #52949: Speed decrease since 4.5

Class loader does not cache non existing classes

Added by Alexander Stehlik over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
Start date:
2013-11-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Just found this one while testing https://review.typo3.org/25673/:

ValidatorResolver->buildBaseValidatorConjunction()

called by

ActionController->initializeActionMethodValidators()

will always trigger the class loader because it calls:

class_exists('string')

which of course is not a class and does not exist.

Therefore it will not be stored in the cache and the whole class loader process starts all over again.

This is done by every request to the page module (by the SysNote hook).

Maybe it would make sense to store information about non existing classes in the cache?


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #53970: getBaseValidatorConjunction is called for simple typesClosed2013-11-26

Actions
Related to TYPO3 Core - Task #56086: Impexp functional tests do not fail on wrong assertionClosed2014-02-18

Actions
Actions #1

Updated by Markus Klein over 10 years ago

  • Parent task set to #52949
Actions #2

Updated by Gerrit Code Review over 10 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/25679

Actions #3

Updated by Philipp Gampe over 10 years ago

We should of course cache negative requests, but this sounds more like a bug in extbase?!?

Actions #4

Updated by Alexander Stehlik over 10 years ago

I guess you could consider this as a bug. I opened #53970 for this :)

Actions #5

Updated by Thomas Maroschik about 10 years ago

I am strongly against the caching of non existent classes. By doing so you break the class loader chain, if there are more than one class loader present.

Rather class_exists calls to simple types should be first checked via the TypeHandlingUtility.

Actions #6

Updated by Alexander Stehlik about 10 years ago

Which class loader chain do you mean?

Do you mean the native PHP chain when multiple autoloaders are registered? If so I can not see a problem because if the TYPO3 class loader fails the next one in the chain should take over, right?

Or is there a class loading chain inside the TYPO3 class loader? If so it should be possible to cache non existing classes after the chain.

I agree that the TypeHandlingUtility needs to be fixed. And I can not really think of a use case when you would run a lot of class_exist calls of non existing classes. But this does not mean it will not happen.

Do you see other problems besides the loader chain?

Actions #7

Updated by Gerrit Code Review about 10 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/25679

Actions #8

Updated by Gerrit Code Review about 10 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/25679

Actions #9

Updated by Alexander Stehlik about 10 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF