[TYPO3-mvc] speed improvements in own extbase extension
Patrick Schriner
pschriner at gmx.de
Fri Jun 6 12:14:40 CEST 2014
I second this! The extension_builder extension will (in most cases) *not*
create all required indexes.
You can check your queries easily if you call wrap your call to the
repository with:
$GLOBALS['TYPO3_DB']->debugOuput = 2;
$result = YOUR_REPOSITORY_FIND_CALL;
$result->toArray(); // this will force the actuall database query - note
that this will be without pagination applied, and will probably crash if
you have > a thousand results
$GLOBALS['TYPO3_DB']->debugOuput = FALSE; // we don't want all other
queries to show up.
Side note: If you expect to get many results, you should require
pagination. toArray() would also be poison in such environments.
Regards,
Patrick
On Fri, 06 Jun 2014 11:09:10 +0200, Markus Klein <klein.t3 at mfc-linz.at>
wrote:
> Hi!
>
> I suppose you already did the basic stuff and checked all queries with
> EXPLAIN to see if indexes are used?
> Besides that it's really hard to tell from your description where your
> bottleneck is. If it's loading to much data, maybe lazy loading helps in
> some areas.
>
> Kind regards
> Markus
>
> ------------------------------------------------------------
> Markus Klein
> TYPO3 CMS Active Contributors Team Member
>
>> -----Original Message-----
>> From: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
>> project-typo3v4mvc-bounces at lists.typo3.org] On Behalf Of Stefan Kruse
>> Sent: Friday, June 06, 2014 8:06 AM
>> To: typo3-project-typo3v4mvc at lists.typo3.org
>> Subject: [TYPO3-mvc] speed improvements in own extbase extension
>>
>> Hi,
>>
>> i have an extbase extension and it seems so i need speed improvements
>> for
>> this.
>>
>> Here is what i done with the extension.
>>
>> Its a big searchform. There are companies and every company can have
>> multiple categories assigned to. You can search for these categories
>> and get
>> all companies, or you can search directly for a company name. Ok, i try
>> 2
>> ways. The first is: I have a m:m relation from the company to category.
>> Thats
>> works ok , but then we found out that we need some additional info for
>> every assigned category. There should be a possibility to add a name
>> and a
>> phone number to every assigned category. Ok, that bring us to second
>> way: I
>> created a new model named listing. There are relations to category and
>> company. And the additional properties name and phone. So every company
>> can have multiple listings.
>>
>> But when i search now for these listing then it takes a lot of time to
>> get the
>> results. In the database there are 200.000 entries.
>>
>> I know its hard to understand maybe but i hope someone has a tip how i
>> can
>> make some speed improvements.
>>
>> Thanks Stefan
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
--
More information about the TYPO3-project-typo3v4mvc
mailing list