Performance in Sorting huge data objects

Background

We are extracting data from one source system, manipulating it in java and storing it in another target system.

Problem

We are sorting the java objects and then pushing the data into another system.

Time taken to sort 48000 objects is 24 minutes.

And it keeps on increasing drastically when number of objects increases.

The max size of data that we are looking forward to is around 200,000.

I used the java parameter to SET JAVA_OPTIONS=="-Xmx512m -Xss512k".

Changing it to a lower value increased the time taken for sort.

Would appriciate if someone could give me pointers for performance improvement on this process.

[691 byte] By [ketansuri] at [2007-9-30 17:20:43]
# 1
Question, what is the form of the source and target data? Are we talking about file storage or db storage here?
puckstopper31 at 2007-7-6 13:43:37 > top of Java-index,Java Essentials,Java Programming...
# 2
First, look for bottlenecks. Is most of that time spent reading and writing the objects or sorting them?
ehodges at 2007-7-6 13:43:37 > top of Java-index,Java Essentials,Java Programming...
# 3
Normally I doubt it is the sorting that taking up time.java.util.Arrays.sort and java.util.Collections.sort both are pretty efficient, no problem sorting 200,000 items. Like others mentioned, check your performance profile, see what is taking that much time.
yue42 at 2007-7-6 13:43:37 > top of Java-index,Java Essentials,Java Programming...
# 4

> java.util.Arrays.sort and java.util.Collections.sort

> both are pretty efficient, no problem sorting 200,000

> items. Like others mentioned, check your performance

> profile, see what is taking that much time.

In particular, check your comparator object performance.

sabre150 at 2007-7-6 13:43:37 > top of Java-index,Java Essentials,Java Programming...
# 5

> Changing it to a lower value increased the time taken

> for sort.

>

> Would appriciate if someone could give me pointers for

> performance improvement on this process.

Are you clocking the sort call only?

What data structure are you sorting?

Are you using your own sort method?

Have you overridden compareTo in the object class?

UlrikaJ at 2007-7-6 13:43:37 > top of Java-index,Java Essentials,Java Programming...