[TYPO3-english] Extbase/Fluid running out of memory
Jan Bednarik
info at bednarik.org
Tue Oct 21 22:26:09 CEST 2014
Hi,
> All objects are created this way, then properties copied to an array and
> - depending on how you create the nested array - copied again.
> This results in 3x all properties in memory, plus some house keeping
> information from PHP itself.
basically it's (pseudocode to get the idea)
foreach ($items as $item) {
$firstchar = substr(1);
$array[$firstchar] = $item;
}
> Do the grouping in the query (repository) and use a paginate widget to
> reduce the number of objects created.
I'd have to run query for each letter in alphabet, plus some more as
czech language has special letter "ch" :).
Anyway, I did some tweaks and hosting raised memory to 512MB. The tweaks
were that I'm running "execute(true)" so I'm getting plain array for
records. Then the memory ran out in Fluid template, by removing parts I
figured out that the problem is "f:link.action", so I'm constructing
links to detail view in controller via good old "typolink". That was
enough to make it work with 128MB.
> You do not actually want to display 6000+ things on a single page. Reduce
> the number of objects needed.
Unfortunately I do. It's crazy I know, you can check it out -
http://new.artlist.cz/index.php?id=47
Jan
More information about the TYPO3-english
mailing list