[TYPO3-core] RFC #11764: speed up list module by improving internal handling of localisations

Rupert Germann rupi at gmx.li
Mon Aug 24 11:55:20 CEST 2009


FYI: committed to trunk rev 5814
final patch attached

changes compared to first version:
- inserted missing spaces
- added description for the new parameter $row
- moved declaration of $this->translateTools to class.t3lib_recordlist.php
- added declaration for $this->translations



for now that was the last patch of the "speed-up-the-list-module" series.


http://bugs.typo3.org/view.php?id=11718
http://bugs.typo3.org/view.php?id=11722
http://bugs.typo3.org/view.php?id=11746
http://bugs.typo3.org/view.php?id=11747
http://bugs.typo3.org/view.php?id=11764

before these patches the (extended) list module needed up to 8(!) 
queries to display a row.

now it needs 3 queries for each row.
(only in the worst case when localisations are enabled in the extended 
listview)

greets
rupert




Rupert Germann schrieb:
> Hi,
> 
> this is a SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=11764
> 
> Branches: Trunk
> 
> Problem:
> The handling of translations in the list module (localization view) is 
> inefficient.
> 2 SQL queries will be executed to find existing localisations and for 
> showing the localisation panel. Both queries are basically the same, 
> only the selected fields are changed. Additionally the list module 
> instantiates a new object of class.t3lib_transl8tools for each record 
> which is shown in the list.
> class t3lib_transl8tools is initiated in exactly the same way each time 
> (no constructor or other changing vars)
> 
> Solution:
> Make only one query to find localizations and re-use the result.
> initialize class transl8tools only once in function start() in 
> class.db_list.inc and re-use it.
> 
> Benchmarks:
> time for displaying a list of 100 records (single table view, 
> Localization view=1). Page has 2 alternative page languages
> 
> trunk = ~115ms
> patched = ~97ms
> 
> measured in class.db_list.inc function generateList()
> 
> greets
> rupert
> 
> 
> 
> "There shall be no new TYPO3 version delivering content slower than its 
> predecessor!"
> 



More information about the TYPO3-team-core mailing list