[TYPO3-mvc] Wondering about performance
Daniel Dimitrov
danielsd_bg at yahoo.fr
Wed Apr 28 10:37:22 CEST 2010
Hey Franz,
So you say there is nothing wrong with having the properties in the list
view too?
If we were not programming with extbase we would just go and make a select
query and get the 5 properties for list view. Then for single view we would
make another query and select the 30 properties we need.
Isn't this wasting resources right now?
Regards,
Daniel
"Franz Koch" <typo3.RemoveForMessage at elements-net.de> wrote in message
news:mailman.1.1272442621.26808.typo3-project-typo3v4mvc at lists.typo3.org...
> Hey,
>
>> In my controller I did this:
>> $products = $this->listRepository->findAllWithLimit($pages,10);
>> var_dump($products);
>>
>> As you see I wrote my own query to fetch the results with limit.
>> In my var_dump output I was seeing the description variable and it was
>> initialized - it had the values from the database.
>> I thought that lazy loading will set the description variable to 0 and
>> first when I try to use it in my fluid template it will be loaded.
>> Did I understand the principal behind lazy loading wrong?
>
> AFAIK @lazy is only applying to properties relating to other objects. It
> doesn't make sense to use a lazyLoading object(!) (which is used in those
> cases) for any other property types. So you will always get all properties
> filled, which is quite useful though. Imagine somebody is using your
> extension and likes to display some other properties in the listView, but
> your stripped down models don't provide those?
>
> --
> kind regards,
> Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list