[TYPO3-mvc] Wondering about performance

Felix Oertel mehl at foertel.com
Wed Apr 28 09:47:30 CEST 2010


Hey Daniel,

Am 28.04.10 09:30, schrieb Daniel Dimitrov:
> However in list view I must show just 5 fields and in single view I have
> to show some 30 fields.
> I'm using Tx_BwShop_Domain_Model_Products both in single and in list
> view.

You should annotate those values you don't use in list-view as 
lazy-loading (@lazy). This makes the values are not fetched on load but 
on first access ... in case of the list-view: never. ;-)

Did you watch out for a propper LIMIT while fetching the products for 
list-view? It would not make sense to load 10.000 products into ram just 
to display the first 20 of them.

If you have something like categories (for products you most likely 
have) in an m:n-relation in your product and you do not have them 
annotated lazy-loading, on loading extbase will resolve those relations 
and load all the product-objects into the category-property. So it would 
be good to use lazy-loading here as well.

regards, foertel


More information about the TYPO3-project-typo3v4mvc mailing list