I'm running this app in a tomcat 5.5.x container,I am trying to figure out which form of a list is the best for what I need to do here:

I need to have some kind of list or collection that I can search quickly for a specific entry, and then start stepping through the list item by item from that point. The items in the list are all of the same user-defined class (not primitives or pre-defined java classes). My current implementation just uses an iterator starting at the beginning, and just walking through until I find the item I want, and continuing to walk from there, but I'm running into performance issues with this.

The individual lists aren't particularly big: single-digits to at most a couple hundred items, but I do this processing in a big outer loop which will need to scale up to a few thousand iterations of different instances of these lists. What these actually are is individual stores' inventory data, with each list being a list of their inventory data for a month or so, and I will eventually need to iterate over a couple thousand stores for reporting.

If it seems like I'll never get reasonable speed this way, I could switch to calling all the stores' data from the database at once, making the lists huge, but only needing to load them once. However, this makes speed in searching the lists much more of an issue, and I don't know which way is going to give me the best overall performance for this report generation.

Any suggestions are welcome, including suggestions for reworking the basic design...

D



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to