Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Larg GWT Project and compile time problem

How do I do for my larg GWT project, the compile time is going large more and more. If the best way is splitting the module to multiple modules, how can I do this.

RGDS

like image 345
Nav Avatar asked Feb 26 '23 12:02

Nav


2 Answers

I don't think that splitting project to modules will help. to the contrary it even can slow compilation. Speed of compiling depends on number of permutations which GWT compiles.

What you can do:

  • Compile GWT project only for 1 web browser. You can define this explicitly in GWT configuration file. <set-property name="user.agent" value="ie6"/> Other options are ie6, gecko1_8, safari.

  • Reduce number of used languages (for development stage). Use only 1 locale.

like image 72
Igor Konoplyanko Avatar answered Feb 28 '23 03:02

Igor Konoplyanko


The GWT compiler is inherently slow. Konoplianko provided some optimizations in his answer, but this will only go so far. There are 2 more compiler options that will help. You can play around with the number of worker threads, usually going from 1 to 2 will help and sometimes 3, but depending on your system it will hurt compile time when you get above a certain point(usually 3 in my experience). Also you can use the -draftCompile option if you are using 2.1. GWT was architected with the intention that you only compile when you intend to deploy something not during development. It was intended that you use hosted mode for development because it can keep track of what has changed and only recompile what is needed instead of having to recompile everything. I am not sure if it would help but changing the output from OBF to DETAILED or vice-versa might effect compile time.

like image 22
LINEMAN78 Avatar answered Feb 28 '23 03:02

LINEMAN78