[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Huge table, records, scrolling, etc.

I would use the new collection api (List, Sets etc...) for caching the results. Use the unsynchronized versions (not vector) if you don't need multithreaded applications. Then setup your virtual table to get the rows to display from that list fetching more from the dbms as you need.
The trick is probably to get the right implementation of List or Set. I would start of with an arraylist and see where it gets you. Optimize from there on if nessecary.


HTH
Stefan

Mr. Burns wrote:
Hello,
thanks for reply,

I know already to cache some records, to avoid a SELECT * statement sent to database every time the SetData trigger is executed. This is already clear. And how many records I should cache I can easily test with try and error. But my question is HOW should I cache???
Should I use a vector to holde e.g. 25 records, or should I use a 2nd non virtual table and copy to the virtual table if next 25 records are requested to be visible? Or are ther other possibilities? What are the pros and cons of using vector / non virtual table / etc. ?


Thanks for further discussion!