Preload Rating Management components
In the base configuration, PolicyCenter preloads all rate books and their included rate tables and rate routines into cache on system startup. Generally preloading Rating Management components at startup is desirable. Otherwise, components are loaded when the first quote request accesses them, causing the first quote request to be slower.
Preloading Rating Management components is recommended for production systems where an increase in server start time is less important than having faster first quote times. In development mode, where developers often restart PolicyCenter and wait for tests to run, it may be preferable to turn preloading off to speed up server start time while absorbing slower first quote times. These tradeoffs may be more noticeable in systems with complex rating content.
Preloaded Rating Management components are resident in cache, therefore preloading increases the memory requirements of the application. Preloading may load Rating Management components that are never used.
RateBookPreloadEnabled parameter
The RateBookPreloadEnabled configuration parameter controls whether
Rating Management components are preloaded on system startup. This parameter is set to
true in the base configuration.
true or false, PolicyCenter always preloads some parts of
rate books that load quickly. After this, PolicyCenter writes this message to the log
file:INFO Application.Rating.RateTableManagement Preloading all ratebooksTherefore,
this message is not an indication of the RateBookPreloadEnabled parameter
setting.OverriddenTableArgsLabelSimple parameter
You can speed up rate table preloading by setting the configuration parameter
OverriddenTableArgsLabelSimple to true. (The
RateBookPreloadEnabled parameter must also be
true.)
When true, when viewing a rate routine on the Rate Routine screen,
parameters in rate routine steps may appear as ellipses (...).
Customizing how Rating Management components are preloaded
Through configuration, you can customize which Rating Management components are preloaded. For example, you can modify the code to only preload frequently-used rate books. In the base configuration, Active rate books are preloaded.
To change which rate books are preloaded, you can modify the RateBooksToPreload getter in the RateBookPreloadPlugin plugin implementation.
if (PCConfigParameters.RateBookPreloadEnabled.getValue()) {
... // preload Rating Management components
}In the RatebookPrimer.prime method, you can also preload other Rating Management components, such as classes outside of rate books. This can speed up the first visit to Rating Management screens.
Loading parameter sets
The code that loads parameter sets is in the prime method in the RatebookPrimer class. Independent of the setting of RateBookPreloadEnabled parameter, this code always preloads parameters sets when the server is in development mode.
