Recently, I upgraded my development environment from Java 6 to Java 8. During compilation (over 4,000 source files), I was encountering OutOfMemory errors when compiling with Java 8. In order to work around this issue, I had to increase my ANT javac task's memoryMaximumSize property value from 512m to 1024m.
When examining the process using task manager, I could see why the aforementioned change was needed. The compiling process memory utilization went from approximately 480 MB to roughly 960 MB. I am somewhat hesitant to implement this change blindly. So, I would like to know:
Why is this change necessary?
Did something change in the Java 8 compiler that uses more memory?
Could it be that old ANTLR is inefficient when used with Java 8? (this is what I believe)
My environment:
- Java 8u66 (32-bit)
- Windows 8
- Eclipse Mars (32-bit)
- ANTLR 2.7.7
In case you're wondering why 32-bit, we have some legacy DLLs that are 32-bit and can't be replaced (for now).