[opencms-dev] CmsCollector performance
Martin Bednář
bednar at triax.cz
Thu Jan 17 20:51:02 CET 2008
I have problems with very poor performance of Collectors, specialy with
allInFolderDateReleasedDesc and allInSubTreeDateReleasedDesc. I have
site with about >10000 articles categorized in folders, so i have this
structure
/Categories
/Categories/Cat1
/Categories/Cat2
/Categories/CatX
...
in Cat1, CatX i have page which shows articles in whole category (with
paging by 20 articles)
on homepage i have 20 newest articles from all categories
I use something like:
<cms:contentload
collector="allInSubTreeDateReleasedDesc"
param="/Categories/|magArticle|20"
editable="true">
respectively in cat1
<cms:contentload
collector="allInSubTreeDateReleasedDesc"
param="/Categories/Cat1/|magArticle"
pageSize="20" pageIndex="1" editable="true">
Performance is very poor, I looked to source code and see that CMS works
(for my HP for exmaple) in this way:
Load /Categories resource from DB, Create CmsResource
Load all 10000 under /Categories resources from DB and Create
CmsResource objects for it
Sort all 10000 CmsResources by ReleaseDate
throw 9980 unneeded objects !!!
return 20 CmsResources
It's really crazy.
Is there a way how to optimize it ?
Why data is not sorted on SQL server and returned only 20 items in
recordset ?
I thing that it's really performance problem, waste of CPU and memory.
This operation takes about 2,3min on my server (CPU 2xQuadCore 2,4GHz,
4GB RAM, 8xHDD on 3WareCard in RAID6) on my old server with AMD64
Opteron and 4HDD in SW RAID it takes about 14minutes !
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080117/1a6ba341/attachment.htm>
More information about the opencms-dev
mailing list