How to run your web application and web workers in Super Dev Mode
Web workers are a way to exploit the CPU's cores available. If you have a web application that requires a lot of computing power, it is a great way to tap an unexploited resource.
For example, setTimeout is only fake threading. If you have a computationally intensive piece of code, it impacts everything: asynchronous treatments, event handling, everything.
Hence, you should move the code that requires more CPU resources to web workers. Web Workers are effectively independent processes running in the browser.
The problem is there was so far no convenient way to do it with GWT.
If you have tried it before, you have found that you need to employ a custom linker to compile your web worker. However, if you do that, you cannot use Super Dev Mode, and you have to keep your web worker separated from the main application.
I decided to have a look at that because I needed to run an algorithm called Monte Carlo Tree Search; and as you guessed it uses the CPU a lot.
Soon I was able to make it work.
Therefore, I could deploy both my main application and its web workers alongside, in Super Dev Mode.
I am attaching here two GWT 2.8.2 patched JARs so that you can play with it too!
And I will see how to integrate it directly to GWT.
The only thing that is not working yet is the source map of the web workers.
Anyway, to be able to use web workers efficiently in GWT is an invaluable addition, even more since Service Workers finally landed in Safari.
Patched GWT 2.8.2 JARs (gwt-codeserver.jar and get-dev.jar)
If you want to see what I did in the GWT source:
GWT source code patch