10 November 2006

IDEA’s go-faster flag

It's a common joke among programmers and other IT folk that most software performance problems have a simple solution: just enable the go-faster flag. This mythical option will enable your application to run faster with no adverse side-effects.

On the Confluence team we have a similar joke about our real-but-not-functional donotsuck Java system property. The joke is always that we should add functionality to this negative suckage mode which makes Confluence suck less.

As with most programming jokes, the idea of a go-faster flag contains a kernel of truth. Many applications ship with features enabled which make them run slowly. Disabling some of these features can often result in minimal loss of functionality while drastically improving performance.

IntelliJ IDEA on the Mac has a feature like this: automatic file synchronisation. The synchronisation process can take over 30 seconds for the Confluence code on my new Macbook Pro, and by default occurs every time you switch to the application. Jump to the web browser for a second and come back to IDEA, wait 30 seconds. Read your email for a minute and come back to IDEA, wait 30 seconds. Okay, you get the, er, idea.

If this is affecting you, just jump into the Settings window and disable the file synchronisation on window activation.

IDEA's go-faster flag
IDEA's go-faster flag: disable the synchronize files on frame activation option.

For me, this made IDEA much more useful. The synchronise functionality is still available by clicking on the Synchronize button on the main toolbar. But it no longer takes any noticeable amount of time to switch applications to IDEA.

As for why this operation takes so long, I'm not entirely certain. Mike (who originally gave me this tip) reckons IDEA has a native file access library on Windows by not on Mac OS X. Java's filesystem operations are notoriously slow, so this sounds like a logical explanation. All I know for sure is an operation that takes this long should definitely not occur every time you activate the IDEA window. Hopefully this is fixed in some way in the recently-released IDEA 6.