Expand my Community achievements bar.

SOLVED

How to reduce page load time for CQ5 Pages?

Avatar

Level 2
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

My preferred approaches:

  • Use the "recent requests" tab in your OSGI console to identify components and pages, which take a long time.
  • Take care of JCR queries. Try to get them out of the direct rendering path of a page.
  • Instead of blindly doing JCR queries you could think of tree iteration, which might be faster sometimes.

Regards,
Jörg

View solution in original post

4 Replies

Avatar

Community Advisor

You can do following to reduce your page load time:

  • For Initial analysis of time load for a page, have CQ OOTB Timing component added to the page as it reports the time taken by each component to load and a page.
  • Cache as much content as possible (this would be done with the help of dispatcher)
  • If you components are dependent on webservice or other layers apart from CQ to process and display content then if possible, have them as REST calls done via AJAX, this would reduce server side rendering time.
  • If at all you are going to write sling filters then as they intercept every request define the entry condition before you start processing your request in filters and exit from it as soon as possible.
  • Above point applies to Event listeners as well.
    • Use filters and listeners only when needed as they may cause lower down your server performance.
  • To enhance the performance of server there are certain OSGI configuration suggested at http://docs.adobe.com/docs/en/cq/current/deploying/osgi_configuration_settings.html, follow what suits you (at least you should disable debug filter, and Minify the client libs)

Thanks

Runal

Avatar

Level 10

Along with runal suggestion make sure

  1. All recommended hotfix/sp is installed.
  2. Performance optimization & tunning is done
    1. http://helpx.adobe.com/experience-manager/kb/performancetuningtips.html
    2. http://docs.adobe.com/docs/en/cq/5-6/deploying/performance.html

Avatar

Correct answer by
Employee Advisor

My preferred approaches:

  • Use the "recent requests" tab in your OSGI console to identify components and pages, which take a long time.
  • Take care of JCR queries. Try to get them out of the direct rendering path of a page.
  • Instead of blindly doing JCR queries you could think of tree iteration, which might be faster sometimes.

Regards,
Jörg

Avatar

Level 2

I know, we have to go to the Felix Console and click on “Configuration”. The Bundle to configure is the “Apache Sling Main Servlet” (PID org.apache.sling.engine.impl.SlingMainServlet) and the property, as you may guess “Number of Requests to Record” (sling.max.record.requests). Set it to your desired value.

Question:  but after the configuration how do we track and debug the requests.