Daniel Keir Haywood created CAUSEWAY-3707:
---------------------------------------------

             Summary: [Perf] Preload mixin property values (when displayed in a 
collection)
                 Key: CAUSEWAY-3707
                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3707
             Project: Causeway
          Issue Type: New Feature
          Components: Viewer Wicket
    Affects Versions: 2.0.0
            Reporter: Daniel Keir Haywood
             Fix For: 2.1.0


Following on and similar to CAUSEWAY-3706, if an object has a mixin property, 
and that property is part of a collection, then we'll get an N+1 style of issue 
when each object's (row's) property is evaluated.

To load these instead in bulk, we could have a preload hook (an optional 
interface to be implemented by mixins) that would return a `List<Bookmark>`.  
The Wicket viewer would call this for each object resolved and would then 
aggregate the Bookmarks and fire an event for the JPA/JDO persistence store to 
load them in bulk.

This wouldn't be an exact science, but ought to reduce database queries to some 
extent.  It would probably be easier for JPA than JDO because the underlying 
Ids of the objects that need to be resolved are (probably) easier to obtain.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to