Memory overflow with very many postings
rmaiwald opened this issue · 8 comments
MUBoard 1.1.0 with Zikula 1.3.12
Forums with very many postings - imported Dizkus forums with about 60.000 postings in total - result in memory overflow even with 128 or 256 MB memory_limit and statistics functions both disabled. With about a fiew thousands of postings MUBoard works fine.
Please add support for large forums.
Thanks
Reiner
Did you try to disable some of the plugins? Or to set the memory to 512 MB?
See http://support.zikula.de/module-CMS_Support_Forum-viewtopic-topic-31518.htm
Thanks for your quick response. Increasing the memory_limit doesn't help.
I disabled some plugins and found at least one memory hog. The plugin modifier.muboardGetLastPosting / MUBoard_Util_View::getLastPostingOfForum() reads all postings for a forum. In the category overviews this results in reading alls postings for a category or even for all categories.
Reading all postings can be avoided by first selecting the highest creation or updating timestamp for a forum with the SQL function max() and the group by clause and then selecting the posting with this timestamp.
Regards
Reiner
Hi Reiner,
please check the actual repository.
Ok.
One more fix in lib/MUBoard/Util/View.php getLastPostingOfForum(), line 263 and all works fine:
$repository2->selectById($parent) ==> $postingRepository->selectById($parent)