Monday, September 23, 2013

Re: Code Splitting with Factory usage?

If the factory is shared it ends up in the left over fragment.

If the classes the factory creates also end up in the left over fragment probably somewhat depends on how you implement the factory. Classes that you use in static initializers and/or class/instance variables are likely to end up in the left over fragment as they are tied to the factory initialization. Anything that you create lazily inside your factory methods have a good chance to be exclusive to a single split point and thus end up in this split point.

If you don't trust the SOYC report then create a small proof of concept app and compile it in pretty mode. Then take a look at the JS code in each split point. I have once done this to debug a code splitting issue and from what I can tell the code splitter works on method/constructor level.

Also try GWT trunk. It contains quite some code splitting fixes.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment