[TYPO3-english] Extbase -> reduce queries in m:m relations

Robert Wildling rowild at gmx.net
Mon Sep 9 20:59:42 CEST 2013


Hi, Roland,

Thank you very much for your response!

@lazy loading: I have to admit that I do not really grasp the concept of 
lazy loading. To my knowledge this technique helps to load information 
only then, when it is needed, like stuff for the detail view, when it is 
called from a list view with a specific id.

But if it does NOT work like that and only necessary fields are fetched 
even on the list page, then I wonder: how does extbase know, which 
fields are needed? By "parsing" the fluid template?

In my case, the are of course more scenarios, but the event page indeed 
needs some bits of info down to the 3rd level of m:m-related data *at 
once*. There is no link to a single/detail view. So even though I just 
tried to add the @lazy annotation, there is no change in speed whatsoever.

I would love to find a way to get the separat event piece-by-piece, and 
via AJAX add them together. That would at least provide some immediate 
visual feedback. What would be the proper way to appraoch such a solution?

Have a nice evening!
Robert

> did you try lazy loading?
>
> roland
>
> Robert Wildling <rowild at gmx.net> wrote:
>> Hi,
>>
>> I have a kind of library extension that is really rich on m:m tables. It
>> is actually an event extension used as retrospective on an event that
>> took place once a year over the last 17 years. It contains event
>> information, people's profiles, concert data, catalogue of works,
>> location stuff etcetc, everything made with m:m relations, so a kind of
>> "data mining" presentation of all the info is easily possible.
>>
>> When calling the overview event table, the querying process lasts very,
>> very long (something like 8 seconds on my local machine). There are only
>> 17 events, but around 20 m:m relations to tables that again have
>> m:m-relations. Extbase's findAll() seems to read out *all* the
>> information of all those m:m connected tables as the ViewHelper <f:debug> proves.
>>
>> I know that there are functions like "->contains" and "->matching" to
>> build individual queries, but they don't seem to allow to limit the
>> amount of fields to be read, so they eventually again read out each and everything.
>>
>> Or am I wrong? Is there any way to tell an extbase query to only read a
>> very limited amount of fields from m:m-tables, even on the 3rd and 4th level? (subselects?)
>>
>> Thanks for your inputs!
>> Best regards,
>> Robert



More information about the TYPO3-english mailing list