Bug #53556

Epic #55070: Workpackages

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

Bug #52949: Speed decrease since 4.5

classLoader->loadClass calls requireOnce twice per class

Added by Ingo Schmitt almost 6 years ago. Updated over 5 years ago.

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

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Inside classLoad->LoadClass each class is loaded in line 134, but again in line 156.

134:

// Loads any known class via caching framework
        if ($require) {
            if ($this->classesCache->requireOnce($cacheEntryIdentifier) !== FALSE) {
                $cacheEntryCreated = TRUE;
            }
        }

156:

        if ($cacheEntryCreated && $require) {
            if ($this->classesCache->requireOnce($cacheEntryIdentifier) !== FALSE) {
                $cacheEntryCreated = TRUE;
            }
        }

By looking into the logic, it seams if a require was successful in the first part, the require is repeated in the second part. You could speed it up by checking if the require was successful in the first part and avoid the second require.


Related issues

Related to TYPO3 Core - Task #53744: Change ClassLoader cache from proxy require files to standard cache backends Closed 2013-11-18

History

#1 Updated by Ingo Schmitt almost 6 years ago

I'll post a patch at gerrit

#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/25305

#3 Updated by Ernesto Baschny almost 6 years ago

  • Parent task set to #52949

#4 Updated by Thorsten Kahler almost 6 years ago

  • Complexity set to easy

I realized that some time ago, too.

#5 Updated by Gerrit Code Review almost 6 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/25305

#6 Updated by Wouter Wolters almost 6 years ago

  • Status changed from Under Review to Closed

Not needed anymore. Closed.

#7 Updated by Ingo Schmitt over 5 years ago

  • % Done changed from 0 to 100

Also available in: Atom PDF