phanin
phanin

Reputation: 5487

How does putting JDK on a ramdisk improve IDE performance?

I recently found several articles that one could boost IDE (say eclipse) performance by placing JDK on a ramdisk and letting it use it for build purposes. I could guess how that could make things faster but I was not aware of exact details.

Won't the IDEs load needed parts of JDK into memory anyway? Is it a one-time benefit to keep JDK on a ramdisk or is it a continuous thing. It'd be great if someone could shed some light on the exact mechanism.

The motivation is that the project I'm working on is huge and sometimes I do need to turn on 'build automatically' feature in eclipse. I'm exploring ways to speed up the build process

NOTE

I posted a different question with the term 'JVM' in place of 'JDK' which made it confusing and misleading. I apologize for that and I restructured my question.

Upvotes: 5

Views: 2587

Answers (3)

dave_thompson_085
dave_thompson_085

Reputation: 38940

Eclipse 'build automatically' (and Project/Build also) doesn't use the JDK compiler at all, see What is the difference between javac and the Eclipse compiler? . That link indicates the same is true of IntelliJ, but I don't have firsthand knowledge there.

If you are also doing javac builds, for example from maven, ant or such, read speed of JDK tools and JRE/JVM (which it runs on) could matter to those.

Eclipse needs to keep in memory not only the source but the compiled version and symbols for everything; for your huge project I would first check that eclipse itself gets enough RAM and isn't being swapped (by the OS).

Upvotes: 2

sherif
sherif

Reputation: 2332

On linux you can put it into /dev/shm

Upvotes: 1

Anton Malyshev
Anton Malyshev

Reputation: 8861

Just get SSD (it will be sufficient to run IDE at acceptable speed)

As for JVM - yes, it's one time benefit (depends on your RAM amount though)

Upvotes: 1

Related Questions