I would not worry about the time the size() method takes. You don't get back any data and your database is very efficient (I hope). Either you use a compound object, or you create a dedicated method if your provider. François
Le 5 févr. 2013 à 08:43, Rob Audenaerde <rob.audenae...@valuecare.nl> a écrit : > The problem is that there are two calls to the DAO, one for size and one for > iterator. They both take time. I can make these methods return compound > objects that also return the call duration, or wrap the calls in the > DataProvider. I would also need a call to collect this total amount of time. > For this I could use a model that wraps a time collector variable in the > DataProvider. > > > > Op 4 feb. 2013 om 17:44 heft "Francois Meillet" <francois.meil...@gmail.com> > het volgende geschreven: > >> Try to collect the search method's duration in your DAO. >> >> François >> >> Le 4 févr. 2013 à 16:36, Rob Audenaerde <rob.audenae...@valuecare.nl> a >> écrit : >> >>> Hi All, >>> >>> I'm displaying (Lucene)search results in Wicket using a DataTable. The >>> Datatable uses a IDataProvider to populate the toolbars and cells. >>> >>> I try to figure out the amount of time it took to do the query. A typical >>> query involves calls to >>> >>> * size(...) >>> * iterator(...) >>> * model(..) >>> >>> What would be a good approach to count the time spend in these methods? I >>> can implement stuff like System.currentTimeMillis() in each of these calls, >>> but what would be the 'proper' place to do this? >>> >>> And also, I would like to display this time in a Toolbar, so somehow I >>> should make sure when the 'dataloading' part is done. Any hints? >>> >>> http://stackoverflow.com/questions/14686739/wicket-dataprovider-query-search-time >>> >>> >>> Thanks! >>> >>> -Rob >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org