Adam Bien's Weblog

Wednesday Feb 11, 2009

1 Million Rows In A JTable - Or How To Convince C++ Developers

Sometimes it is necessary to perform more dramatic steps to convince C++ developers about Java performance. We developed a JTable with custom model, renderers and editors to port an existing C++ application. We begun with tests, as some of the C++ developers expressed his concerns about the performance and resource usage of the current solution. The old C++ application was able to handle few thousands rows in a table. Instead of discussing the performance of Java we started a spike with 5000 rows in a three row table. The last column consisted of a JComboBox with own model pointing to another 5000 records. It took less than one second to load the table. We increased the number to 50.000 records it took few seconds to load the data and open the application. The we only wanted to break the application and increased the data to 1 million records. ...after about 40 seconds and 1GB heap usage the app opened - it was slow but usable. It is really remarkable because we performed the test without any optimizations. The application was built in object oriented way the domain objects were constructed from REST-like (not really RESTFul) data stream, and were wrapped with a custom table model. Custom renderers and editors were responsible for displaying the data. Every table cell was displayed by a renderer which exposed a domain object. So several instances were involved for a single cell.

We repeated the test within Netbeans Profiler and were able to identify some bottlenecks (unfortunately some of them were written by me...:-)).


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Kommentare:

9 lines of solid text isn't very easy to read! I recommend looking at the layout of your posts, making them narrower and using some paragraph breaks!

Gesendet von Rob am February 13, 2009 at 06:45 PM CET #

Hi Rob,

real Java developers don't care about formatting :-).

[however - you are right - few <p> would help]

thanks for the hint!,

regards,

adam

Gesendet von Adam Bien am February 14, 2009 at 01:08 PM CET #

Could post about the optimizations made or what were the bottlenecks found?

Thanks

Gesendet von Felipe Jaekel am March 03, 2009 at 12:18 PM CET #

Senden Sie einen Kommentar:
  • HTML Syntax: Ausgeschaltet
Interviews/About
My Recent Book
Java One 2009
CommunityOne East N.Y.C
JavaONE 2008 Interview
Search
...the last 150 posts
...the last 10 comments
greenfire.dev.java.net
Links
my.netbeans.org
Visitors
License