[TYPO3-mvc] findAll() with child objects performance

Lorenz Ulrich lorenz-typo3 at visol.ch
Tue Jan 31 22:18:17 CET 2012


Hi everyone

During Extbase development some questions regarding performance raised 
up so I'm interested in how you handle certain things.

If I have an object with relations to several child objects (an artist 
has works, is member of a genre etc.) and I want to list all artists, I 
would normally use the findAll method from the repository, pass it to 
Fluid and use the For ViewHelper to iterate.

This is very slow, even with only 200 people (but each of them having 
about 20 child objects). I assume it is because the object is fetched 
with all its children and then passed to Fluid (where I only need some 
fields like name and uid).

If I add a method to the repository and use $query->statement to fire a 
query that only fetches the fields I need, it is very fast.

Is there a way to have better performance without using $query->statement?

Thanks and best regards,

Lorenz


More information about the TYPO3-project-typo3v4mvc mailing list