Closed GoogleCodeExporter closed 8 years ago
Potentially related - we're noticing that plovr is recompiling even when the
base files don't change. Is this expected?
Original comment by mickn...@gmail.com
on 19 Mar 2011 at 12:01
As with most java apps, you have to explicitly give the VM more ram. We had to
do this recently with our codebase as well, which is roughly the same size as
yours.
Basically when you run java you give it the highly memorable -Xmx arg followed
by the megabytes of ram you need. We're currently using 256, which seems to do
the trick:
java -Xmx256m -jar /my/path/to/plovr.jar serve my-plovr-config.js
Original comment by andydun...@gmail.com
on 23 Mar 2011 at 5:36
Thanks Andy. Yes, that should fix the problem. I guess I'm worried though,
should it be recompiling the binaries every time -- even if there hasn't been
any change to the source files? I see there is a "fingerprint" option, but that
seems to be limited to modules? For a dynamic standalone app, recompiling every
reload is okay -- but with a regular website it becomes painful slow.
Original comment by mickn...@gmail.com
on 24 Mar 2011 at 2:17
Yes, java -Xmx is definitely the fix for your problem. At work, we are
compiling 76,000 lines of our own JS (so that's in addition to all of the code
from the Closure Library that we pull in) and 12,000 lines of Closure
Templates, and we use -Xmx500M when we call plovr.
You probably want to follow Issue #5: "Recompile only if source files have
changed" (http://code.google.com/p/plovr/issues/detail?id=5). Unfortunately, I
haven't gotten around to it yet. The simple fix is to keep track of the
manifest and last modified times for all of the files, though I think the more
interesting (and stronger) fix is to cache more work done by the Compiler, such
as parsing.
Obviously Issue #5 is still open, but I am going to mark this one as closed.
Original comment by bolinf...@gmail.com
on 24 Apr 2011 at 2:33
Original issue reported on code.google.com by
mickn...@gmail.com
on 18 Mar 2011 at 11:57