[TYPO3-performance] Re: Re: Re: Re: DataHandler high memory consumption

Lukas Krieger lukas.krieger at me.com
Wed Nov 5 15:50:57 CET 2014


Hi,

i just compared the returning arrays of both functions and also added some condition based TS for the Backend User, normal Pages and the Rootline.
static public function getPagesTSconfig($id, $rootLine = NULL, $returnPartArray = FALSE) {
		 $original = BackendUtility::getPagesTSconfigOrg($id, $rootLine, $returnPartArray);
		 $modified = BackendUtility::getPagesTSconfigMod($id, $rootLine, $returnPartArray);
		 if($original===$modified)
		 {
			 error_log("id '".$id."' both functions returning the same");
		 }
		 else
		 {
			 error_log("id '".$id."' there is a difference between both functions");
		 }
		 return $original;
	 }

On a normal backend call:
[05-Nov-2014 14:02:24 UTC] id '0' both functions returning the same
[05-Nov-2014 14:02:24 UTC] id '0' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same
[05-Nov-2014 14:02:27 UTC] id '43' both functions returning the same

With following conditions:
Page TS in the rootline
[treeLevel = 2]
options.backendLayout.exclude = 1,2,3
[end]

=> Page id 43 has no more the option to select those layouts 

[05-Nov-2014 14:13:39 UTC] id '43' both functions returning the same
[05-Nov-2014 14:13:40 UTC] id '43' both functions returning the same
[05-Nov-2014 14:13:40 UTC] id '43' both functions returning the same
[05-Nov-2014 14:13:40 UTC] id '43' both functions returning the same
[05-Nov-2014 14:13:40 UTC] id '43' both functions returning the same
[05-Nov-2014 14:13:40 UTC] id '43' both functions returning the same

It is shown in the info->page tsconfig and also all backendlayout are not available in the backend

if i add this to the page tsconfig on page 43:
options.backendLayout.exclude >

The layouts are available again and also the compare function tells me that both functions are returning the same.


Adding a User TS to disable only the 1 layout again for the complete pagetree based on PIDinRootline (overwriting the page TS):
http://docs.typo3.org/typo3cms/TSconfigReference/UserTsconfig/Field/Index.html#userrelationshiptovaluessetinpagetsconfig

[PIDinRootline=1]
page.options.backendLayout.exclude = 1
[end]

=>
On the whole pageTree there is the first layout not available.

My compare function tells me that both functions, the original getPagesTSconfig and the modified one are returning the same result.
Also the caching is still working.


Back to the performance:
Task: modifying 280 pages
Original Function: The whole process needs 19 seconds and is using 85MB memory
Modified Function: The whole process needs also 19 seconds but is only using 14MB memory

Task: modifying 150 pages
Original Function: 9 seconds, 51.1 MB memory
Modified Function: 8.7 seconds, 11MB memory

Task: modifying  118 pages
Original Function: 7.2 seconds,  41.7 MB memory
Modified Function: 6.8 seconds, 10 MB memory

Task: modifying 54 pages
Original Function: 3.6 seconds , 23MB
Modified Function: 3.3 seconds, 8.5 MB memory


Before i can finally upload the patch, i need to know some informations about the cacheManager and how the hashes are stored internally. 
I will have a look at the documentation and come back when i got all informations i need

best,
Lukas



Quote: Philipp Gampe (pgampe) wrote on Tue, 04 November 2014 21:25
----------------------------------------------------
> Hi Lukas,
> 
> Lukas Krieger wrote:
> 
> > Philipp, do you have any specific tests i should run?
> 
> Put a condition based on the user and a condition based on the routeline in 
> each part of the TS.
> 
> > And again, forge issue?
> 
> Yes, please create one if you haven't already, attach your patch and link to 
> this discussion as reference.
> If you want, you can also prepare a patch and push it up to gerrit:
> http://wiki.typo3.org/CWT
> 
> Best regards
> -- 
> Philipp Gampe  PGP-Key 0AD96065  TYPO3 UG Bonn/Köln
> Documentation  Active contributor TYPO3 CMS
> TYPO3 .... inspiring people to share!
----------------------------------------------------



More information about the TYPO3-performance mailing list