GWT Dispatch + GWT Code Splitting

92 views
Skip to first unread message

gktcs

unread,
Jul 19, 2011, 3:30:51 PM7/19/11
to GWT Dispatch
Has anyone been able to get "complete" code splitting working with gwt-
dispatch?

We've got a rather large MVC-based application, and our code splitting
is done at the Controller level. The code splitting works great--
neither the Controller nor the View will be loaded unless the
associated module has been explicitly requested. We use gwt-dispatch
(with SecureDispatchAsync) to provide our communication with the
server. Everything works great with gwt-dispatch, except that all of
our Request (Action) and Result objects are compiled into the initial
download, instead of being included in the split point which contains
the associated Controller and View.

We're using SecureDispatchAsync in the startup module to load some
basic startup information, but all of the other Request/Result pairs
are isolated to a single Controller. The GWT SOYC report shows that
all of the Request and Result objects are being included in the
initial download. It seems like MyResultObject below should be
isolated only with its associated Controller:

Call stack: MyResultObject
MyResultObject::MyResultObject
MyResultObject_FieldSerializer::instantiate
net.customware.gwt.dispatch.client.secure.SecureDispatchService_TypeSerializer::loadMethodsNative
net.customware.gwt.dispatch.client.secure.SecureDispatchService_TypeSerializer::
$clinit
net.customware.gwt.dispatch.client.secure.SecureDispatchService_Proxy::
$clinit
net.customware.gwt.dispatch.client.secure.SecureDispatchAsync::$clinit
net.customware.gwt.dispatch.client.secure.SecureDispatchAsync::
$execute
ApplicationStartupModule::$continueModuleLoad
ApplicationStartupModule$1::execute
com.google.gwt.core.client.Scheduler$ScheduledCommand::$clinit
com.google.gwt.user.client.Command::$clinit
ApplicationStartupModule::$onModuleLoad


I found this discussion, but didn't see any resolution on how to get
around the issue:
http://groups.google.com/group/gwt-dispatch/browse_thread/thread/ba7e3d12f23e4ca0/f6ea64097713358c?lnk=gst&q=code+split#f6ea64097713358c

Just curious if anyone's found a way around this. We have a lot of
Request/Result objects, and they're adding a lot of unnecessary bulk
to our initial application download.

Thanks

Juan Pablo Gardella

unread,
Jul 19, 2011, 3:36:29 PM7/19/11
to gwt-di...@googlegroups.com
+1

2011/7/19 gktcs <tdots...@gmail.com>

Robert Munteanu

unread,
Jul 19, 2011, 4:40:27 PM7/19/11
to gwt-di...@googlegroups.com
Sorry, I have not used code splitting with gwt-dispatch. I'm curious to see if anyone else has a concrete recipe.

David Peterson

unread,
Jul 20, 2011, 3:18:00 AM7/20/11
to gwt-di...@googlegroups.com
Yeah, likewise. I'm not going to be of much assistance unfortunately.
Reply all
Reply to author
Forward
0 new messages