1

We are facing performance issues while loading the page for first time, on an average its taking 19 seconds.

However, after enabling the cache, when you refresh the page, it's loading within 2 seconds.

But caching only persists for a limited set time. So we would like to know what is causing the page to take a long time when the cache is not active and also possible suggestion to fix this.

really appreciate your help.

  • Are you using DXA .NET or Java? – Rick Pannekoek Mar 26 at 18:00
  • Please provide some more information about your implementation? – Sayantan Basu Mar 26 at 18:02
  • its a DXA Java application. – user2869 Mar 26 at 20:32
  • Did you enable caching in content service? – Velmurugan Mar 26 at 20:47
  • Yes Vel. we enabled the Cache Channel service as well as App cache – Jayakumar Devaraj Mar 27 at 17:06
6

There are various reasons to your page loading for the first time call will get slow.

The first request to a publication requires downloading & parsing of a lot of binary files with publication configuration after that page and used images and components links resolving calls for that page.

To gain the performance caching is important to enable in your implementation.

There are various optimization and checks you can do for performance in DXA

  1. Enable DXA Java web applications caching by modifying the cd_client_conf.xml and ehcache.xml files, It's time-based caching keep it at least some 3 to 5 mins based on your business requirements.
  2. Enable output caching (Not sure DXA 1.8 has output caching option)
  3. Make sure your binaries CSS, images, and js are getting cached(max age) in a browser, it could be a big performance impact as each binary request also go to your code which does modification check validation before serving the binary
  4. To enable Tridion Content Service caching by updating your cd_stroage_config.xml, as shown below
<ObjectCache Enabled="true">
  <Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
    <Param Name="MemSize" Value="16mb"/>
  </Policy>
  <Features>
    <Feature Type="DependencyTracker" Class="com.tridion.cache.DependencyTracker"/>
  </Features>
</ObjectCache>

Then for each item, you would like to store in cache, you should also set

<Item typeMapping="Page" cached="true" storageId="defaultFile"/>

You may also wish to consider MemSize, For Invalidating the Content Service caching either you can use Cache Channel service or JMS Active MQ

  1. You may wish to consider using CDN caching for your web application in production.
  2. Or else consider to migrating to DXA 2.0, SDL released DXA 2.0 part of this new version is a new REST service called the model service, which is able to return content quicker, and in a leaner R2 format. Not only that, the model service is also able to resolve links in the content on the fly. This is an important performance improvement, because link resolving is one of the most expensive operations in DXA.

I hope it helps

  • Thaks alot Velmurugan for your response.We will check, as per your suggestions. – user2869 Mar 27 at 13:33
  • Hi Velmurugan, your suggestion helped us and improved the performance. – user2869 Mar 27 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.