Description
Calculating titles can cause pages to render much slower than they otherwise would, because any object with a reference to others (especially in a collection) requires the title to be evaluated for those references, and this often will require that entity to be fetched in order to access its properties that make up its title. In the worst case, that referenced object's title might use not only scalar properties, but also other referenced information, so a whole cascade of queries might kick off.
One option to address this is for domain entities to cache their own title as a persisted property. That works, but is boilerplate and laborious.
This ticket suggests that (unless a domain object opts out), we have an implementation of TitleFacet that looks up the title from an object's Bookmark/oid. The cache implementation itself should be an SPI, with an in-memory as the default that could be enabled ; other alternatives would be Redis etc.
Whenever an object is modified then the cache is updated.
Refinements:
- The cache might also be time-limited (mru/lru), so that titles age out after time.
- A background service might go around eagerly populating the cache
Attachments
Issue Links
- duplicates
-
CAUSEWAY-3783 [DUPLICATE] Improved table rendering performance.
- Closed