0

Possible Duplicate:
How do I speed up the gwt compiler?

I work on a GWT project where the debug mode is not useful, thanks to the incredible amount of time it takes to parse JSON responses from a REST service (we're talking 5 minutes to parse one average response in debug mode, as opposed to a second or two when compiled).

However, the time it takes to compile a GWT project is also becoming unacceptable. So what can be done to speed up the GWT compile process?

Community
  • 1
  • 1
Phyxx
  • 15,730
  • 13
  • 73
  • 112
  • Have you tried [Super Dev Mode](https://developers.google.com/web-toolkit/articles/superdevmode)? Also try `AutoBean` for JSON processing, or [Elemental](https://developers.google.com/web-toolkit/articles/elemental)'s JSON (they will parse JSON in the JVM in DevMode, rather than in the browser, no JSNI involved) – Thomas Broyer Sep 21 '12 at 08:47
  • Super Dev Mode does look like an awesome solution to these issues, but I have yet to actually try it. When I do I'll post some numbers here though. – Phyxx Sep 23 '12 at 21:21

1 Answers1

7

How do I speed up the gwt compiler? has a good selections of tips for speeding up the GWT compilation process, so I thought I'd share some of my results.

NOTES

Setting the user agent requires

<inherits name='com.google.gwt.user.UserAgent'/>

and

<set-property name="user.agent" value="safari"/>

to be set in your whatever.gwt.xml module file. Otherwise you'll get the error

[ERROR] Property 'user.agent' not found

The -draftCompile option needs to be set as a JVM variable in Eclipse as

-Dgwt.draftCompile=true

enter image description here

Community
  • 1
  • 1
Phyxx
  • 15,730
  • 13
  • 73
  • 112
  • I'd add also: . W/o this, when ran from Firefox we get: Uncaught Error: Class$S15: Possible problem with your *.gwt.xml module file. The compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8). Expect more errors. – Cristian Jun 28 '23 at 18:32