GWT project structure to reduce compile time

251 views
Skip to first unread message

Beatriz Nombela

unread,
Dec 11, 2013, 11:00:36 AM12/11/13
to google-we...@googlegroups.com
Hi!

I'm trying to reduce the compile time of a GWT project on jenkins. My project structure can be summarized to the following one:

- module_1: jar and GWT module
- module_2: multimodule maven project, each submodule is a jar, and each one contains a GWT module. Each GWT module inherits from module_1
- module_3: war, contains a GWT module that inherits from module_2

The problem with this structure is the moment when everything is compiled on jenkins:
- module_1 compiles
- module_2 compiles, and accordingly module_1 is compiled again
- module_3 compiles, and accordingly each submodule in module_2 is compiled, and at the same time module_1 is compiled again some more times

My goal is to avoid recompiling some of the modules so many times. I'd like to know whether the GWT modules are well structured or not, so I could focus on restructuring GWT modules or in Jenkins side.

Thanks in advance!

salk31

unread,
Dec 16, 2013, 9:00:17 AM12/16/13
to google-we...@googlegroups.com
Are all your modules actually producing JavaScript you are going to run?

If not then you don't need to GWT compile those?

To do the clever optimisation GWT does it looks at the source for all the client code. So I don't think you would save a lot re-structuring (if you really need to produce JavaScript each time).

Beatriz Nombela

unread,
Dec 16, 2013, 12:42:35 PM12/16/13
to google-we...@googlegroups.com
Yep, all modules produce the javascript code that I'm going to run. In that case I'll keep the current structure I have.

Thanks!

Thomas Broyer

unread,
Dec 21, 2013, 6:21:02 PM12/21/13
to google-we...@googlegroups.com
If you GWT-compiler a module, it (generally) means it's standalone. It might be "inherited" by other modules, but you'd generally extract an intermediate module to work as a "library" (vs. "application").

But that shouldn't really affect what you're seeing. If your problem is that module_1 is recompiled when compiling a module that inherits it, then it probably means you have a configuration issue in your POM. Are you using module auto-discovery with the gwt-maven-plugin? (from what I can see from the code, it shouldn't see module_1, but maybe I missed something).

But are you really sure the modules are recompiled? Keep in mind that GWT compilation is monolithic (for the time being, this will change).
Reply all
Reply to author
Forward
0 new messages