Is it possible the code in Bob is so trivial that the GWT compiler inlined
it completely?

On Fri, Feb 5, 2010 at 11:06 AM, Sky <[email protected]> wrote:

> Hi Jonathan.
>
> I just tried making some of my own code split using the async callback
> for the first time and I was successful. I get a deferredjs folder and
> I can see that in the initial download report my class is only 30
> bytes (because I call a method returning a static string outside of
> the async callback) and I get a split point location in the report
> saying my class is 216 bytes. Prior to making it async the class was
> 246 bytes. So it split it absolutely perfectly!
>
> I don't know what you are doing wrong (or could be encountering a
> special case bug...) but you seem to know how to use it quite well. I
> can only suggest that you may still have some code somewhere that
> calls "new Bob()" and thus it isn't being split. I'm sure you've
> triple checked so it must not be your problem.
>
> Try reading through the following two pages again to see if you can
> glean any more information that might help you.
> http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html
> http://code.google.com/webtoolkit/doc/latest/DevGuideCompileReport.html
>
> Sorry I couldn't help :(
>
> gl
>
> On Feb 4, 1:30 pm, Jonathan <[email protected]> wrote:
> > If I create a basic GWT 2.0 project, and add some basic code
> > splitting, it works perfectly fine.
> >
> > But our main application is pretty massive and complex.  I cannot get
> > it to split ANY code whatsoever - even the most basic test.  I
> > generally confirm this by looking at the soyc compile report but it's
> > also obvious since there's no deferredjs folder.
> >
> > My most basic test involves creating an incredibly basic POJO class
> > and referencing this class only from the onSuccess() method of the
> > runAsync callback.
> >
> > GWT.runAsync(new RunAsyncCallback()
> > {
> >       public void onSuccess()
> >       {
> >               Info.display("Title", (new Bob("Code splitting
> > worked").getName()));
> >       }
> >
> >       public void onFailure(Throwable reason)
> >       {
> >               Info.display("Code splitting failed", "Code splitting
> > failed");
> >
> >       }
> >
> > });
> >
> > public class Bob
> > {
> >       private final String name;
> >
> >       public Bob(String name)
> >       {
> >               this.name = name;
> >       }
> >
> >       public String getName()
> >       {
> >               return name;
> >       }
> >
> > }
> >
> > The info messages (basic GXT class to display debug message) displays
> > "Code splitting worked".  But the report doesn't show any splits.  And
> > the class Bob shows up in the initial download. No matter where I put
> > these code splits and what I try to split, I cannot get any code split
> > to show.  There's no errors in the GWT compiler output.  We're using
> > the standard linker.  I really don't know how to proceed from here.
> > Can anyone provide any help?  Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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

Reply via email to