GWT Super Dev Mode Incremental Compilation doesnt work - gwt

I use gwt 2.6.1. I've would like to use Super Dev Mode.
I normally run with RMB on project, then I select Run Super Dev Mode.
My app is huge, so it takes time to compile, and finally when it is done I am making small change in gwt client code, I refresh web page, and nothing happend. Application have same view/behavior like before this change.
Only stopping Super Dev Mode and starting it again makes changes visible, but it takes so much time (cause it recompile from scratch).
Please help me, how can I use incremental compillation in gwt.
I've already added:
<add-linker name="xsiframe"/>
to my *.gwt.xml file.
please help.

Related

Unrea Engine 4.27.1 project always build everything

I use ue4.27.1, by compiling engine source codes.
However, whenever I try to build sources after changing build configuration 'Develpment editor' to 'DebugGame editor' (or the opposite way) it compiles all 4240 modules.
It compiles more than 2700 modules when I press F5 to play it. It often happens but now this always happens.
"Invalidating makefile" or "create makefile(no makefile)" messages are always shown in the log.
I think this got worse when I created a new class for my project, but I'm not that sure about that.
If anyone got any ideas about this, please, please share your knowledge.
btw it didn't happened with 4.26.2 but happens with 4.27

GWT Development mode

I have started creating my first project with GWT. In first lines of code, it worked normally and I had no need to GWT Compile every time to see a simple change in my browser.
For client changes, a save file was enough and for server a save and refresh server. But now it has stopped working like before.
For the smallest change like adding a "Window.alert("msg")" I need to reGWTCompile the whole project to see it! What could have issued this?
Make sure you're running in DevMode (i.e. have ?gwt.codesvr= in your URL)

GWT development with Eclipse

I am developing a GWT app using eclipse and I was wondering if there is a way to hot swap client code changes I make without having to do a full Google Compile each time. Currently when I modify my code, I do a Google compile and then click the Reload server button, then I refresh my browser to pick up the changes. This is starting to get a bit painful as it takes 10 - 20 sec to do a full compile when I may have only modified a UI string so was wondered is there a quicker way.
If you want to see your changes in client code, hit the refresh button in your browser.
If you need debug functions, use Debug As => Web Application. It may be a little (or a lot) slower to start depending on a browser.
If you don't need debug functionality, use Run As => Web Application. It starts faster. You will still see all errors in Development Mode and Console tabs.
If you make changes to server-side code, you have to reload the web server, using the dedicated button of the dedicated Development Mode view in Eclipse.
You never need to recompile unless the plugin tells you to do it.
See https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideDevMode
To add to Andrei's answer Assuming we are changing functionality invoked on button click.
1) We usually change lines of code in the function invoked and click the button again in the UI. No need of reloaing the entire application using refresh button.
2) If the change involves code that cannot be hotswapped - example class changes like adding new a class variable, then you need to refresh browser. You can sometimes ignore the eclipse warning complaining that it cannot hot-swap.
3) If you run out of memory then you need to close and relaunch dev mode.
4) If your server side is hogging memory then it might be better idea to use external server rather than jetty to avoid time consumed on server restart for every dev mode launch.

Unable to turn on GWT Super Dev Mode

While trying to use GWT Super Dev Mode, I followed those guidelines :
GWT-2.5-Super-Dev-Mode
Introducing Super Dev Mode
How does GWT's Super Dev Mode work?
However, I am stuck at the step trying to turn on Super Dev Mode :
Once I fully compiled my project, I run the code server and the dev mode, go at http://127.0.0.1:8888/myapp.html (without the ?gwt.codesvr=127.0.0.1:9997) and then click on the bookmark Dev Mode On. It detects my module, asks me to recompile, a glass screen appears with a message Compiling MyApp ... and then nothing ... No error, no stack trace either in Chrome or Eclipse. Just nothing happens.
Debugging the js code from dev_mode_on.js file, the script is interrupted at line 324 :
...
function getBindingParameters(module_name, get_prop_map) {
var session_key = '__gwtDevModeSession:' + module_name;
--> var prop_map = get_prop_map(); <--
...
Once the function get_prop_map is called, a few more obfuscated functions run and the debugger returns.
I know it is still experimental, but do you have any idea of what I could have done wrong ?
PS: I am using GWT 2.5, GWT-maven-plugin 2.5 and Chrome 23.0.1271.64 m
We have found a similar issue and tracked down the cause, looks like a boundary case not handled in GWT.
More info can be found here: http://code.google.com/p/google-web-toolkit/issues/detail?id=7894
I don't have an answer, but I can give some general debugging tips for this sort of problem.
Super Dev Mode currently (as of 2.5) doesn't report any progress to the web browser while it's compiling. It won't update the dialog until the compile finishes. So it's possible that it's just very slow for your program for some reason, or the compile stopped and somehow didn't report an error like it normally does.
However, there are other ways you can monitor its progress. The compiler log is available as a web page by following links from the code server's front page; you will have to refresh the page to see updates. Or you could look at the log on disk in the code server's work directory. (You can set the work directory with the -workDir argument when you start it.)
Another way is to start the code server from the command line. Any stack traces from the code server will be printed there. You should also be able to look at the output in Eclipse or IntelliJ if you're running it from there.
From this you should be able to tell whether the compiler is slow, but still working (it's still printing output) or has actually stopped with a stack trace.

GWT: does code-splitting have any effect when in development mode

I've read in so many places that code-splitting can significantly speed up the initial loading time of a GWT application.
However, before we do the splitting, we would like to know whether the deferred download of codes also work when in development mode?
Currently our most painful point is that in development mode with debug mode, when we refresh the browser (to refresh the changes in client code) it will take 3.7 years for the app to reload.
In production mode the application will load in a matter of seconds.
Code splitting has absolutely no effect in Dev Mode, because your application is not compiled to JavaScript.
When GWT.isScript() is false (Dev Mode) RunAsyncCallback.onSuccess() method is run immediately. It is apparent if you inspect the source code of the GWT.runAsync() method.
EDIT: just a small thing to add as well: do NOT use Chrome with DevMode. Chrome still has an outstanding bug (the link escapes me right now) that makes the DevMode Plugin for Chrome run really slowly. Use Firefox, it is the fastest with the Dev Mode plugin.
As said before code splitting has absolutely no effect in Dev Mode.
Only thing that I could suggest you is to increase memory for jvm on start:
For example we use in our project:
-Xmx1024m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M
Also upgrade your working hardware(CPU, memory), it's could help you to compile faster your java code on Dev mode.
If you want faster DevMode you should be more careful with how you write your application. User lazy loading where possible, split app into standalone modules.
E.g. let's say you have some app with 5000 classes. And usually a developer needs to change only some part of application, not all application (one page for example). So basically you need to make sure that to start one simple part of app, only classes needed by the app are loaded. E.g. instead of loading 5000 classes only 100 will be loaded. Also check for common errors like RPC Type Explosion, they affect devmode as well. And try GWT 2.4 it is much faster than previous versions (I mean DevMode).
In my (medium length) experience I noticed Internet Explorer 9 is also pretty fast in Dev Mode, and a lot more stable than Chrome. The GWT plug-in doesn't crash every other reload of the application.
You could give it a try, see if it works better for you.