Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to reduce page load time for CQ5 Pages?

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

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
Runal_Trivedi
Community Advisor
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

Jörg_Hoh
Correct answer by
Employee
Employee

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

sampath_kumar_g
Level 2
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.