You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rob Audenaerde <Ro...@Valuecare.nl> on 2013/02/04 16:36:58 UTC

Wicket dataprovider query / search time

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket dataprovider query / search time

Posted by Francois Meillet <fr...@gmail.com>.
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 <Ro...@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" <fr...@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 <Ro...@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-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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


Re: Wicket dataprovider query / search time

Posted by Rob Audenaerde <Ro...@Valuecare.nl>.
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" <fr...@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 <Ro...@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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 


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


Re: Wicket dataprovider query / search time

Posted by Francois Meillet <fr...@gmail.com>.
Try to collect the search method's duration in your DAO.

François

Le 4 févr. 2013 à 16:36, Rob Audenaerde <Ro...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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