We have a huge GWT project, which is the result of a monocular app about the size of 2 MB. The obvious way to break it is to use split points. For example, our app is operated from the menu, so the logic behind each menu operation can be a split point. In addition, the code that calls to GWT RPC can also be a split point. In this way 2 MB App may be broken into 300K startup app, which is loaded on the first usage.
GWT calls GWT.runAsync () where places can be broken JS in smaller pieces in which asynchronous loads are runtime, such as to set a split point where doSomething () is applied We are writing this like this:
GWT.runAsync (new checksyncrollback) {Public null (fiddling caught on throwing) {Window.alert ("Oh, app Could not Load ");} Success on Public Zero () {doSomething ();}});
The GWT compiler will look at this code and mark it as a candidate for splitting and break the code into smaller pieces, which will be loaded when used first.
We have the problem that if we put the split points in the code, then it actually becomes 10-50x tall to produce. I think this code is not very efficient when working with a large class project. That's why a 2-minute building builds a 20-100 minute which is unacceptable.
The question is, how can I put a split point in the code, but to stop the sharing of the compiler until I ask it clearly? I think the points of division of development of the day will be ignored, but the construction of one night or production will be divided.
Any thoughts?
Pass -draftcompile as a compiler argument. Take a look at this post:
Comments
Post a Comment