[TYPO3-dev] typoLink() further tuning

Vladimir Podkovanov admin at sitesfactory.ru
Wed Jul 1 05:43:44 CEST 2009


Hi list!
I want to add new feature to typolink in order to further improve
performance.
In real life it is quit often that typolink is being used to create 
links to the same page where link located itself. It happens every time 
when you have same PIDs for list view and single view for some plugin.
To create such link back to the same page it is often used construction 
like typolink.parameter.data = TSFE:id
I propose to add keyword "self" to produce links to same page.

Benefits:
1) saves time on parsing and retrieving getText's TSFE:id
2) "self" keyword allows us to refactor typoLink() function in such way 
that these links are not going through some checks like checking if the 
page exists and is accessible (because it is the page being rendered 
yet) it saves some function calls and processing here.

So with "self" some processing into typolinks can be skipped and 
considering that page can contains tens or hundreds links it will 
increase overall performance. Also it looks more neat ;)
typolink.parameter = self   vs.   typolink.parameter.data = TSFE:id

-- 
-rgds-
Vladimir




More information about the TYPO3-dev mailing list