Tuesday, January 10, 2012

Re: Efficient code splitting in a large application?

There is already a new code splitting algorithm in development that tries to conter this problem by merging split points that share a good amount of code and thus making this shared code exclusively to the newly merged split point.

That way you may define 50 split points in GWT but end up having only 18 real fragments generated where each of them is a bit bigger because it contains code that is currently in the leftover fragment or in the initial download fragment. So it tries to minimize both.

If you want a solution today, I think the only way to counter this problem is to reduce the number of split points. For example only make one split point for splitting login and app to make the login screen load faster and then add some more split points for the app's top level navigation items. 

Hopefully the new algorithm will do a good job in merging fragments and will be released (or at least be testable) in GWT 2.5. For code see:  http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter2.java


-- J.

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

No comments:

Post a Comment