I'm using runAsync in GWT to split my code for different subsystems of my app, with the Async provider pattern (found in the code splitting documentation). So, every time i need to instantiate any of my classes using runAsync, I create a method for that subsystem - getAsync(..) - with an interface parameter containing onSuccess(Subsystem instance) (called when the code is downloaded). When I need to call a method for that class instance, I first call the getAsync(...) and inside the interface's onSuccess(instance), I call instance.myMethod(). The problem is that the majority of the code is put in the Leftover code, and not in the exclusive split point for that subsystem. What am I missing here ?
Asked
Active
Viewed 366 times
0
-
First you find where you want to split then add split point, i think split points are mixing some where. – Parvathy Mar 15 '13 at 10:25
-
Did you go through GWT compiler reports? – appbootup Mar 15 '13 at 16:48
-
I believe that using a method that contains runAsync (to instantiate an object and use its methods) multiple times, in more than one location, will determine the respective code to be placed and the Leftover code. That doesn't seem ok, because i should't need to call GWT.runAsync every time I want to create that object... – Andrei F Mar 18 '13 at 07:51