Loading

First-time invocation of an Executable Expression Set takes longer than subsequent invocations

Date de publication: Jun 22, 2026
Description

The users reported intermittent high execution times when Business Rules Engine rules are executed. Execution sometimes takes 0.5 seconds but can increase to more than 20 seconds, causing critical impact because the rules are used to evaluate risk clients during a real-time onboarding process.

This behaviour is expected by design and has been confirmed by Salesforce Engineering.

Salesforce ships a library of pre-built, ready-to-execute Expression Set templates that come with the platform.

  • The first time an Executable Expression Set is requested for execution from Apex or Flow on a given application server, the platform loads these templates into the application server's in-memory cache.
  • All subsequent executions on the same application server reuse the cached templates and complete much faster.
  • Because the loading step happens only on the first request, that single request observes additional latency compared with all later requests.

This is a one-time, platform-level initialization. The cached templates can be re-loaded periodically (for example, when a server is restarted, when the cache entry expires, or when a request is routed to a different application server that has not yet loaded them). When that happens, the next request that lands on a "cold" server will again experience the longer first-request latency, after which the cache is warm again.


Note: This is applied only for Executable Expression set templates

Résolution

NA

Numéro d’article de la base de connaissances

005386639

 
Chargement
Salesforce Help | Article