{"action":"created","issue":{"url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/47","labels_url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/47/comments","events_url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/47/events","html_url":"https://github.com/gmarty/grunt-closure-compiler/pull/47","id":40642540,"number":47,"title":"Made the java binary location customizable","user":{"login":"gfreeau","id":1403669,"avatar_url":"https://avatars.githubusercontent.com/u/1403669?v=3","gravatar_id":"","url":"https://api.github.com/users/gfreeau","html_url":"https://github.com/gfreeau","followers_url":"https://api.github.com/users/gfreeau/followers","following_url":"https://api.github.com/users/gfreeau/following{/other_user}","gists_url":"https://api.github.com/users/gfreeau/gists{/gist_id}","starred_url":"https://api.github.com/users/gfreeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfreeau/subscriptions","organizations_url":"https://api.github.com/users/gfreeau/orgs","repos_url":"https://api.github.com/users/gfreeau/repos","events_url":"https://api.github.com/users/gfreeau/events{/privacy}","received_events_url":"https://api.github.com/users/gfreeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-08-19T22:08:21Z","updated_at":"2015-01-22T11:51:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/pulls/47","html_url":"https://github.com/gmarty/grunt-closure-compiler/pull/47","diff_url":"https://github.com/gmarty/grunt-closure-compiler/pull/47.diff","patch_url":"https://github.com/gmarty/grunt-closure-compiler/pull/47.patch"},"body":"Closure compiler docs (https://code.google.com/p/closure-compiler/wiki/FAQ) recommend the use of 32bit JVM for performance improvements.\r\n\r\nI 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.\r\n\r\nThis 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.\r\n\r\nWith this patch you can specify this in the grunt task config:\r\n\r\n```\r\n{\r\n    javaBin: '/opt/jdk1.8.0_20/bin/java -client -d32',\r\n    closurePath: ...,\r\n}\r\n```\r\n\r\nYou 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.\r\n\r\nAlso, is there any reason this.options() is not used in the task? Seems it would be more efficient for this."},"comment":{"url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/comments/71009526","html_url":"https://github.com/gmarty/grunt-closure-compiler/pull/47#issuecomment-71009526","issue_url":"https://api.github.com/repos/gmarty/grunt-closure-compiler/issues/47","id":71009526,"user":{"login":"y-a-v-a","id":375507,"avatar_url":"https://avatars.githubusercontent.com/u/375507?v=3","gravatar_id":"","url":"https://api.github.com/users/y-a-v-a","html_url":"https://github.com/y-a-v-a","followers_url":"https://api.github.com/users/y-a-v-a/followers","following_url":"https://api.github.com/users/y-a-v-a/following{/other_user}","gists_url":"https://api.github.com/users/y-a-v-a/gists{/gist_id}","starred_url":"https://api.github.com/users/y-a-v-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y-a-v-a/subscriptions","organizations_url":"https://api.github.com/users/y-a-v-a/orgs","repos_url":"https://api.github.com/users/y-a-v-a/repos","events_url":"https://api.github.com/users/y-a-v-a/events{/privacy}","received_events_url":"https://api.github.com/users/y-a-v-a/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T11:51:45Z","updated_at":"2015-01-22T11:51:45Z","body":"+1"}}