Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 610
phanin Avatar asked Sep 27 '22 20:09

phanin


2 Answers

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).

like image 100
dave_thompson_085 Avatar answered Oct 03 '22 03:10

dave_thompson_085


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)

like image 42
Anton Malyshev Avatar answered Oct 03 '22 02:10

Anton Malyshev