This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Performance and the fly likes JTable too slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JTable too slow" Watch "JTable too slow" New topic

JTable too slow

Dylan Margoczi
Ranch Hand

Joined: Jul 12, 2007
Posts: 38
Simple question, how can I speed up my JTable loading data?

All has been good until now, the amount of data I'm loading into the JTable is slowing it down. I'm only loading +/- 50 rows. Is this the JTable that is slowing down or could it maybe be the actual loading of the data from the database? It's not too slow as yet (but it is noticable) but I'm just worried when it comes to thousands of rows that have to be loaded.

Thanks Dylan.
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Why not write a dummy data source, that just gets the data from memory? Compare the subjective and/or measured performance of this against your database-backed version. That should give you the answer.

Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Dylan Margoczi
Ranch Hand

Joined: Jul 12, 2007
Posts: 38
Thanks, I'll give that a try
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 862
Use the jamon jdbc driver and you will have performance metrics for all sql statements issued, as well as all jdbc interface calls. You simply use the jamon proxy jdbc driver in place of your real db driver.

See this link for an example: - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
I agree. Here's the link:
subject: JTable too slow
It's not a secret anymore!