For a couple years now I have been disappointed that one of my 2D Java programs had HORRIBLE performance on my laptop. I noticed the problem got horrible when I upgraded to Vista and didn’t get fixed with my upgrade to Windows 7. The program is a 2D graphing application that draws multiple data streams as scrolling waveforms on the screen in real-time. It is written using Java Swing libraries and the Graphics2D API. On my laptop I was getting less than 1 update per second. On my work computer I was exceeding 200!

Over the last couple years I tried everything to no avail. Finally today I stumbled across this article that describes several unsupported Java system properties that affect the 2D graphics system.

I tried adding the following line to my program and voila! Awesome performance. Problem solved.