Performance Improvement with UI Caching

Introduction

Joget has been thoroughly profiled and optimized to ensure minimal platform overhead. However, in enterprise apps that rely on dynamic data, each page request requires many database queries. Database calls are slow not just in query execution but especially in network I/O. In most cases, database calls are the main performance bottlenecks that cause lengthy page response times and limit scalability.

Caching is storing data in memory to reduce the need for database calls. When applied correctly, caching can significantly improve app performance and scalability.

How does it work?

Caching is now available for all UI  pages. Requiring just a few settings, any UI  menu and page can be easily cached to eliminate bottlenecks and reduce server-side processing.

In every UI  Menu property page, there is a Performance tab that contains the cache settings.

  • Scope:
    • None: No caching is enabled. This is the default setting.
    • Application: The UI page content is cached at the application level, which means that the same content is visible to all users. This scope is suitable for read-only content that is meant to be shared by everyone, such as public HTML content and general forms.
    • User: The UI page content is cached per user. This means that a copy of personalized content is stored for each user login. This scope is suitable for a user's private content where heavy processing is required to display it, and it is acceptable for the content to be slightly delayed, such as custom data list inbox and personalized forms.
  • Duration (s): The duration in seconds to cache the content.
It is important to note that not all pages can or should be cached, depending on the actual processing time and data or privacy requirement for each page. However, when configured appropriately, app performance can improve significantly.

In a mixed-use case test app (a user logs in, views a data list inbox, starts a process, and logs out), the throughput (average requests per second) for a cached version in a load test shows an improvement of almost 30% to 60% compared to previous uncached versions. See the chart below:

Additional Resources

The following are additional resources for performance optimization:

Created by Marcos Last modified by Aadrian on Dec 13, 2024