Take a look at the Apache Wicket Cookbook:
http://www.packtpub.com/article/apache-wicket-displaying-data-using-datatabl
e

It caches the data for the request.

Also others have implemented such caching mechanism:
http://opensource.55minutes.com/apidocs/fiftyfive-wicket-all/4.0/fiftyfive/w
icket/data/DtoDataProvider.html

I usually only cache the count() since it depends on what's in the cell
after all (especially for the foreign keys when you want to display a name
and not an ID).

~ Thank you,
  Paul Bors

-----Original Message-----
From: Daniel Watrous [mailto:dwmaill...@gmail.com] 
Sent: Tuesday, June 11, 2013 11:56 AM
To: users@wicket.apache.org
Subject: Paging and excessive database access (repeaters)

Hi,

I'm following the example in the repeaters section for paging through large
amounts of data:
http://www.wicket-library.com/wicket-examples-6.0.x/repeater/wicket/bookmark
able/org.apache.wicket.examples.repeater.PagingPage

Based on the example and how I've had to implement this there is a lot of
data access. First is in the ContactDataProvider. The function iterator
queries for the set of data that will be displayed.

Next, all the objects that are returned need to be wrapped in a
DetachableContactModel. The load mechanism here then loads each individual
object from the datastore.

In the example, the data is in memory. In a real world scenario the data is
likely to be remote and this setup could have a significant performance
impact.

Is there some way to cut out some of the data access? For example, can I get
rid of DetachableContactModel and just use the data retrieved through the
ContactDataProvider?

Thanks,
Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to