Load previous superdevmode state between devmode restarts (2.7.0)

49 views
Skip to first unread message

Eduard Català

unread,
Dec 3, 2014, 7:37:13 AM12/3/14
to google-we...@googlegroups.com
Hi,
I'm working on a large gwt 2.7.0 project, we've to restart the web server constantly to test server logic. 

When devmode (and superdevmode) starts we have to reload the page. Then we have to wait the first superdevmode compilation (long, too long...) but no client side code has changed between restart of webserver.

Is there any way to take advantage of previous superdevmode compilations (saving superdevmode state between server restarts)? I've tried with setting -workDir but no luck, first copilation is not used.

Thank yoou!!!!

Thomas Broyer

unread,
Dec 3, 2014, 9:41:31 AM12/3/14
to google-we...@googlegroups.com
The next version of GWT will reuse the cache from previous SDM runs, but in your case I don't think you actually need it:

When launching SDM through DevMode (i.e. serving your server-side code from the embedded Jetty server), you can restart the web server (actually redeploy the webapp) without restarting DevMode.
In Eclipse with the GPE, use the yellow double spinning arrows' button in the DevMode view. When launching DevMode by other means (with its own Swing-based window), you'll find a "restart server" button in the "Jetty" tab.
 

Eduard Català

unread,
Dec 3, 2014, 9:57:21 AM12/3/14
to google-we...@googlegroups.com
Tank you Thomas,

But restarting Jetty Server button does not work properly:  At third redeploy (50MB of jar libraries) an OutOfMemoryError is thrown, i suspect that embedded jetty server is not properly restarted  (only reloads context without stopping entire server).


Jens

unread,
Dec 3, 2014, 10:06:54 AM12/3/14
to google-we...@googlegroups.com
But restarting Jetty Server button does not work properly:  At third redeploy (50MB of jar libraries) an OutOfMemoryError is thrown, i suspect that embedded jetty server is not properly restarted  (only reloads context without stopping entire server).

Thats more a sign of a memory leak in one of your server side libraries or your own code (ClassLoader leak / ThreadLocal leak). 

-- J. 

Thomas Broyer

unread,
Dec 3, 2014, 10:09:39 AM12/3/14
to google-we...@googlegroups.com


On Wednesday, December 3, 2014 3:57:21 PM UTC+1, Eduard Català wrote:
Tank you Thomas,

But restarting Jetty Server button does not work properly:  At third redeploy (50MB of jar libraries) an OutOfMemoryError is thrown, i suspect that embedded jetty server is not properly restarted  (only reloads context without stopping entire server).

Then you could use a third-party, independent server, and run SDM on its own (pointing -launcherDir to the webapp directory used by the other server so that "compile on load" works; or using the "Dev Mode On" and "Dev Mode Off" bookmarklets).

Note that I don't think Jetty leaks memory, but there are libraries that leak memory by artificially keeping the old ClassLoader in memory and preventing it being garbage-collected. One such library is Guice (through Guava); see https://github.com/tbroyer/gwt-maven-archetypes/issues/19
There could also be leaks if your webapp happens to pass some object to a class in the parent classloader that would retain it (e.g. putting it in a static field), preventing the whole webapp ClassLoader from being garbage-collected.
 

Eduard Català

unread,
Dec 3, 2014, 10:16:29 AM12/3/14
to google-we...@googlegroups.com
Yes, sure it's this kind of ClassLoader reference!!
I would try the third-party server approach!! Thankyou!!!


Eduard Català
Cap àrea de Software 
661.537.743 / 972.104.177  - eca...@dset-solutions.com

DSET Solutions
Parc Científic i Tecnològic de la UdG - 17003 Girona

http://www.dset-solutions.com

Avís legal


--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/FHXfx_a69sk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages