I have an app that generates hundreds of additional classes during
compile that I then manage via a single class that uses GWT.runAsync
to perform code splitting so that I can load these classes lazily at
runtime.

My problem is that the compile never finishes, it will just eat up all
of my system ram until either my system becomes unresponsive, or the
compiler chokes out with an OutOfMemoryException.  I've tried
compiling with up to 50GB available to the compiler and no avail (it
will use it all).  I am using GWT maven plugin with localWorkers=1 to
keep the permutation compilation to 1 worker thread.  I want the
compileReport, so I have that turned on, but it doesn't help if it's
turned off, either.

Without code splitting, the compile finishes, but my app weighs in
pretty heavy, so that's why I'm looking to get the code split working.

My questions are:

Has anyone else tried to do a massive amount of code splitting
(hundreds or more) and had success?

Does anyone have any internal knowledge on how code splits are handled
by the compiler that might cause this?  I've hooked up a profiler and
can see that the majority of the heap is getting used by HashMap and
char[].

As a test, I short-circuited the generation stage to generate only 6
classes total, instead of the 100's that would normally be generated,
and the compile finishes no problem (and the code splits look OK).
For that run, here is a snippet from my compilerMetrics.xml:

 <compilation  id="0" elapsed="11490" totalElapsed="102756"
description="ClientBundle.enableInlining=true,compiler.emulatedStack=true,compiler.predeclare.cross.fragment.references=false,compiler.stackMode=emulated,gwt.forceBidi=false,gwt.logging.enabled=FALSE,gwt.rpc.hijackLegacyInterface=false,gwt.suppressNonStaticFinalFieldWarnings=false,locale=default,log_ConsoleLogger=ENABLED,log_DivLogger=DISABLED,log_FirebugLogger=DISABLED,log_GWTLogger=ENABLED,log_RemoteLogger=NOT_SET_BY_APPLICATION,log_SystemLogger=ENABLED,log_WindowLogger=DISABLED,log_level=DEBUG,user.agent=gecko1_8,videoElementSupport=maybe,audioElementSupport=maybe,canvasElementSupport=maybe,storageSupport=maybe,touchEventSupport=maybe">
   <javascript size="1207093" fragments="8">
    <fragment initial="true" size="327554" />
    <fragment size="134847" />
    <fragment size="34126" />
    <fragment size="96050" />
    <fragment size="139174" />
    <fragment size="31457" />
    <fragment size="329674" />
    <fragment size="114211" />
   </javascript>
  </compilation>

I think my next step is to hook a debugger up to the compiler, but I
figured I shoot this out there just in case.

Cheers,

Aaron

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to