We help IT Professionals succeed at work.

Speed up Java applications running in Windows XP?

Is there a way to speed up Java applications running in Windows XP?  I do not have access to the pre-compiled code.  I am playing a Java game that consumes a lot of processor time and memory.
Comment
Watch Question

Bart CremersJava Architect

Commented:
One thing you could try is checking the Java version you're running. If you're still on Java 5 you should upgrade to Java 6 because there are a lot of performance improvements in Java 6.

Besides that it's very hard to give good tips of improving performance as I've got no clue of where processor power is going to:

1. Garbage Collection: If the program has to limited heap space it will spent a lot of processor time in collecting unreferenced objects (garbage). Increasing the maximum heap space of the Java process might help out. Playing with GC settings might help to, but that's a bit more advanced.

2. Swapping: If there's not enough system memory available for the Java process, it will start swapping it of to disk. Once this starts happening performance will go down.

3. Calculations in game: Nothing you can do here. The calculations could be needed, or they could be the result of poorly written code. In both cases you can only hope for another version or start upgrading your system.

Author

Commented:
Would creating a RAM disk be a good alternative?
Java Architect
Commented:
A RAM disk will only give a performance improvement if the game writes/reads a lot to/from disk. A Java program requires a bit longer startup time to load up the VM and the needed classes, but after that it will keep everything in memory.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.