I have a three-tier EJB application, and I need to create a view for a thick client (Java desktop application) that shows a very large collection of objects (more than 5000 orders). Each object has child properties, which are also complex objects, for example:
class Address { String value
The view is a table of Orders:
Number | FirstAddress | Last Address | ...
My first attempt was to load a complete list of orders (without child properties) and then dynamically load child objects when needed for display. But when I have 10,000 orders and start scrolling quickly, the user interface becomes unresponsive.
Then I try to load all the orders and all the children that should appear in the table, but the user interface becomes very heavy and slow, possibly due to the cost of memory). And this is not a fat client at all, because I download almost all the data from db.
What is the best practice for solving this problem?
source share