[opencms-dev] Performance issues with detail page

Georg Westenberger g.westenberger at alkacon.com
Thu Mar 21 15:19:42 CET 2013


Hello Alex,
>
> We’re currently testing the performance of OpenCms by load testing the 
> different page types. By testing them one at a time, we’ve found that 
> the detail page suffers greatly when accessing it with more than 50 users.
>
> Our last test included 50 users accessing concurrently to a detail 
> page, and the response times are far higher than the rest of the 
> pages. For your information, we’re testing the detail page of the 
> default site.
>
> Analysing the thread dumps we can see calls to synchronized methods 
> such as isDetailPage and getParentFolderType, both coming from the 
> CmsConfigurationCache class. What does this class do, we can not yet 
> tell, and thus we’d like to know where is this CmsConfigurationCache 
> class called from.
>
> These calls to synchronized methods generate response times way too 
> high, either because the locks aren’t released correctly or because 
> there are deadlocks within the calls.
>
> What is this cache exactly? Can it be disabled? Is it part of 
> flexcache or can we find more documentation on this class?
>
Thank you for pointing this out to us. It is an internal cache used for 
several OpenCms 8 functions, including Advanced Direct Edit and detail 
pages. These functions wouldn't work without the
cache, so you can't disable it. The methods you mention are used by the 
class org.opencms.ade.detailpage.CmsDetailPageResourceHandler (whose job 
it is to resolve incoming requests
for detail pages) to validate whether the requested detail page actually 
corresponds to a detail page configured in the sitemap configuration.

It is not possible to change this behavior purely with a configuration 
setting. We will certainly work on improving the performance of that 
resource handler class in future versions, but
if you need a solution more quickly, I suggest writing a custom subclass 
which overrides the isValidDetailPage method:

public class MyDetailPageResourceHandler extends 
org.opencms.ade.detailpage.CmsDetailPageResourceHandler {

@Override
protected boolean isValidDetailPage(CmsObject cms, CmsResource page, 
CmsResource detailRes) {
// don't validate detail page
return page != null;
}
}

You then would need to configure this class *instead* of 
CmsDetailPageResourceHandler in opencms-system.xml in the <resourceinit> 
section.

Kind regards,
Georg.

--
Georg Westenberger

Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org              
        




More information about the opencms-dev mailing list