Feature #56486

Optimize the ObjectManager for performance

Added by Kobbe van Daatselaar over 1 year ago. Updated over 1 year ago.

Status:New Start date:2014-03-03
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No

Description

The getCaseSensitiveObjectName operation in the ObjectManager can be optimized for better performance. The loop trough the objects variable is a CPU / time intensive loop.

2 fixes:

1) Cache the cachedLowerCasedObjectNames variable (between requests).
2) If the function returns false, this should also be saved in the cachedLowerCasedObjectNames variable.
Add this line before the return FALSE:
$this->cachedLowerCasedObjectNames[$lowerCasedObjectName] = false;

In my case a 5 - 10 ms performance improvement on a 100ms request.

History

#1 Updated by Alexander Berl over 1 year ago

I think 2) is a good risk-free optimization (though not sure how much that really makes up for).
For 1) it should be properly checked what the overhead for handling the cache instance for that variable is.

Also available in: Atom PDF