Some tuning consideration for WCM v6.1
As we are currently trying to optimize our WCM custom development for v6.1, I would like to share with you the best practices that has been applied so far and which leads to really good performances improvements.
1/ WCM response time improvement
1.a/ Menu "tuning":
- Here the standard best practices should be applied (I will not detail that here) and this give good improvements.
- One thing that should be noticed is that the "Results per page" parameter should be carefully setted to the proper value in v6. This is a difference compare to WCM v5: in version 5, we did create a lots of menu without worrying about this parameter (some of the Menu "Results per page" parameter is set to 10.000 items !...I know this is not a best practice) and the impact on performance does not seems to be really important...but now in v6 it does matter because the impact on performance is very important for this option.
- For menu, the sorting option are also very important (please note that in v6 you can set the first sorting option only, like "Publish date", and then set the other 2 option to "None" to avoid duplicating the sorting treatments).
- Also for Menu, we did set the "Maximum pages to include" and "Pages to read ahead" parameter to value 1 (default is 10). This modification does improve performance. However, please note that there might be some security limitation, as per the wiki:
"For unsecure sites (where content is accessed anonymously or always accessed by the same user, eg. Administrator), set ‘Maximum pages to include’ and ‘Pages to read ahead’ to 1"
For more info about menu, see: Menu components
Other tuning recommendation for Menu can be found here: tuning-for-web-content-management
---------------------
1.b/ Use workspace.login() and logout() method even for short WCM treatment:
Firstly go to:
Web Content Management API Best Practices
and read the section regarding WCM "long running applications": the recommendation is to do the login and logout around "each" set of WCM API call. We did it in our case for the JSP Component launched by our WCM Local Rendering Portlet and this really maximixe performance !!! (even this is not a long running treatment, because the Portlet rendering time is around 100 ms).
After discussing with the support my understanding is that login/logouts commands are involved in the management of the JCR workspace object. The JCR workspace object should be considered as a set of data (set of JCR node). So it is something like a database pool connection and/or a resultset (set of data returned by the database), and the login command role is to force the "binding" or "loading" of the JCR workspace in memory.
---------------------
1.c/ Tuning rendering operation:
In our JSP Component (launched by our WCM Local Rendering Portlet) we used to launch the rendering as follows in v5:
rc.setRenderedContent(content, sitearea)
Instead in v6, it is recommended to use this instruction:
rc.setRenderedContent(String)
The string represents the path of the content and can be obtained by using workspace.getPathById(DocumentId id, boolean maintainCase, boolean
decodeURL). The id can be retrieved from content.getId().
This also really improve performance on the rendering side.
==========================================
2/ Problem that has not be solved so far:
One of the main problem which is still not solved in our case, is the management of the WCM categories:
In version 6, we have identified that retrieving categories assigned on a content items is a very slow operation: the following method takes around 2s to retrieve a list of 40 categories ID assigned to the content object:
DocumentId[] catIds = content.getCategoryIds();
We have applied CF9, but this does not solve the performance problem...
We have open a PMR for that...will let you know if we do any progress regarding this issue.
---------------------
Hope this will help.
1/ WCM response time improvement
1.a/ Menu "tuning":
- Here the standard best practices should be applied (I will not detail that here) and this give good improvements.
- One thing that should be noticed is that the "Results per page" parameter should be carefully setted to the proper value in v6. This is a difference compare to WCM v5: in version 5, we did create a lots of menu without worrying about this parameter (some of the Menu "Results per page" parameter is set to 10.000 items !...I know this is not a best practice) and the impact on performance does not seems to be really important...but now in v6 it does matter because the impact on performance is very important for this option.
- For menu, the sorting option are also very important (please note that in v6 you can set the first sorting option only, like "Publish date", and then set the other 2 option to "None" to avoid duplicating the sorting treatments).
- Also for Menu, we did set the "Maximum pages to include" and "Pages to read ahead" parameter to value 1 (default is 10). This modification does improve performance. However, please note that there might be some security limitation, as per the wiki:
"For unsecure sites (where content is accessed anonymously or always accessed by the same user, eg. Administrator), set ‘Maximum pages to include’ and ‘Pages to read ahead’ to 1"
For more info about menu, see: Menu components
Other tuning recommendation for Menu can be found here: tuning-for-web-content-management
---------------------
1.b/ Use workspace.login() and logout() method even for short WCM treatment:
Firstly go to:
Web Content Management API Best Practices
and read the section regarding WCM "long running applications": the recommendation is to do the login and logout around "each" set of WCM API call. We did it in our case for the JSP Component launched by our WCM Local Rendering Portlet and this really maximixe performance !!! (even this is not a long running treatment, because the Portlet rendering time is around 100 ms).
After discussing with the support my understanding is that login/logouts commands are involved in the management of the JCR workspace object. The JCR workspace object should be considered as a set of data (set of JCR node). So it is something like a database pool connection and/or a resultset (set of data returned by the database), and the login command role is to force the "binding" or "loading" of the JCR workspace in memory.
---------------------
1.c/ Tuning rendering operation:
In our JSP Component (launched by our WCM Local Rendering Portlet) we used to launch the rendering as follows in v5:
rc.setRenderedContent(content, sitearea)
Instead in v6, it is recommended to use this instruction:
rc.setRenderedContent(String)
The string represents the path of the content and can be obtained by using workspace.getPathById(DocumentId id, boolean maintainCase, boolean
decodeURL). The id can be retrieved from content.getId().
This also really improve performance on the rendering side.
==========================================
2/ Problem that has not be solved so far:
One of the main problem which is still not solved in our case, is the management of the WCM categories:
In version 6, we have identified that retrieving categories assigned on a content items is a very slow operation: the following method takes around 2s to retrieve a list of 40 categories ID assigned to the content object:
DocumentId[] catIds = content.getCategoryIds();
We have applied CF9, but this does not solve the performance problem...
We have open a PMR for that...will let you know if we do any progress regarding this issue.
---------------------
Hope this will help.
0 Comments:
Post a Comment
<< Home