Made the java binary location customizable #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closure compiler docs (https://code.google.com/p/closure-compiler/wiki/FAQ) recommend the use of 32bit JVM for performance improvements.
I was able to improve my project compile time from 70 seconds to 15 seconds by using their recommendations. The problem is the java binary is hard coded to use your system default.
This is not ideal because most people would be running a 64bit JVM and the 32bit JVM would only be used for a specific purpose, so trying to run a 32 bit JVM alongside a 64bit one would take a lot of tinkering.
With this patch you can specify this in the grunt task config:
You can download any JDK and place it somewhere on the system and without setting any environment variables or editing anything etc, you can use it just for doing the compiling to gain the speed increase.
Also, is there any reason this.options() is not used in the task? Seems it would be more efficient for this.