JTable and huge dataset... best practice?

D

Dag Sunde

This is just a preliminary post...

I've been called in from vacation to help out with some
performance-problems in an applet.

I just have the problem description so far, and haven't
seen the actual implementation yet. But I thought I could
ask in a generic way.

* Applet is to show a JTable with 24 rows (hours) of data.
* Columns represents (strike)-prices.
* Number of columns (headers) varies between min and max
strike price depending on tick-size (minimum resolution).
* Cells contains volumes.

* Headers and data is read from web-server as a string:
(r1c1;r1c2;...;r1cN|...|rNc1;rNc2;...;rNcN)
* It takes 300 mSec to read a 450Kb string in the above
format from the web-server.
* It takes 2-300 mSec to split the string into a two-
dimentional array of strings.

* It takes 10-15 Seconds to update the data array into
the data-model while the JTables flashes and scrolls
like a maniac.

Goal:
* Reduce the time taken to update or create the data-model.
* Avoid having the JTable look like an animated schess-board
during the process.

I know it's not enough specific information here, but if
someone can give some hints and advice on how such a beast
*should* be handled, I'll really appreciate it!

TIA...
 
K

Kai Schwebke

Dag said:
* It takes 10-15 Seconds to update the data array into
the data-model while the JTables flashes and scrolls
like a maniac.

Goal:
* Reduce the time taken to update or create the data-model.

sounds like every little model update is propagated to the view.
I suggest creating a new model without view from scratch and attach
this to the view as final action.


Kai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top