Skip to main content

JTable Sorting

1 reply [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jesse Wilson

Hello again, JDNC -

I have updated my comparison of JDNC and other JTable sorters at
Hopefully the link works for you this time, it works for me!

Now if you view that comparison you will see that JDNC and TableSorter
both have poor performance when compared to Glazed Lists:

Sorting, time on test machine for a test program of 1000 sorts:
Glazed Lists: 65.5s
TableSorter: 136.3s
JDNC: 117.2s

Model changes, time on test machine for a test program of 1000 row adds:
Glazed Lists: 8.9s
TableSorter: 71.4s
JDNC: 55.7s

Now I acknowledge that this is somewhat of an unfair comparison
because JDNC is still a new project and has not yet been

Yet as JDNC is still a new project, this is the best time to mention
performance enhancements that may require API changes:
- The FilterPipeline looks like a well-thought-out and complete
system. But currently PipelineEvent cannot specify a change
precisely. This means that if only a single row changes, the entire
table must be filtered and sorted. Please consider adding more
precision to enable your filters to do a better job.
- ShuttleSorter is nice because it is stable, meaning that the
second sort does not disturb results of the first sort unless
necessary. But this sort is really slow! Consider using a chain
of comparators instead. With this approach, you can use a
faster sort like quicksort and retain stability. When you use a
chain of comparators, pairs of elements are compared initially
using the first comparator, and the second comparator is used
to break ties.

Again, I really like JDNC and I am excited for the next-generation
of Swing applications that it will allow. If you have any questions
on FilterPipeline-type performance, I have implemented something
similar with Glazed Lists and will be glad to help.


To unsubscribe, e-mail:
For additional commands, e-mail: