Steps to improve AEM site performance

Kinjal P Darji
2 min readMay 3, 2022
  1. While there are multiple connections using httpclient, it is best to have connection timeout set up. This will save the application from awaiting for a thread to get a response for an infinite amount of time and blocking other threads from execution. Also it is beneficial to use multi-threading. Check this link on how to achieve that for httpclient.
  2. If data is shared, it is best to call the service ahead of time and store the data locally in AEM.
  3. Use back off algorithm which halts execution after a specific number of failures.
  4. Third party frameworks should be selected based on their proven performance statistics. For example react vs angular vs . Please check this for comparison. However, sometimes compatibility with AEM can also be bottleneck.
  5. Embed client libs to consolidate them in fewer files (which means fewer http calls). Minify them.
  6. Put CSS in html head tag.
  7. Javascripts should go in the footer.
  8. Domain Sharding can help. Domain Sharding is to include css, js and other files using subdomains.
  9. Cache CSS and javascripts
  10. Avoid landing page redirects. Sometimes this is challenging to achieve considering AEM applications make use of Apache http redirects for url rewriting. Most of the applications hide /content/site hierarchy which causes at least one redirect.
  11. Improve publish server response time. When not all pages are cached, and some pages are served dynamically, it is crucial those pages are served faster. For which publish server has to respond as fast as possible. Which means publisher should not be process big data chunks to serve the pages. Finer grained APIs should be used. There should not be any edit/modify operations going on while serving the page request.
  12. Make use of browser caching. ACS commons could be a good starting point for that.
  13. Optimize images.

--

--

Kinjal P Darji

Hi, I am an AEM architect and a certified AWS Developer — Associate.