[TYPO3-core] RFC #11722: speed up function t3lib_BEfunc::selectVersionsOfRecord

Michael Stucki michael at typo3.org
Fri Aug 14 20:29:25 CEST 2009


Hi Rupi,

> after my last patch was accepted in less than an hour, let's see if this
> works a second time.
> ;-)

Looks not so easy this time. But there's still the chance for a
weekend-commit.

> Type: Bugfix, BE performance improvement

Yeah!

> problem:
> when rendering the extended listview in the Backend, TYPO3 does 2
> queries for each record to find out if it has versions. The first query
> fetches the currently displayed record again which is already present in
> the calling function.
> 
> solution:
> traverse the current $row to function
> t3lib_BEfunc::selectVersionsOfRecord() and re-use it instead of fetching
> it from the DB

I spent quite some time to look at this patch now. Most irritating thing
was that the first query sorts the results, although there is always and
only one match (because uid is unique).

So, here is a new version of that patch which removes the while loop. I
tested it successfully on my dev site.

Attached is one version which applies fine, and one which has
whitespace-changes removed (for easy reviewing).

> "There shall be no new TYPO3 version delivering content slower than its
> predecessor!"

Hugh!! :-)

Cheers, Michael

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list