Re: Compilation of a large GWT application?

2017-04-12 Thread Paul Stockley
For development purposes you could try the following in your .gwt.xml file





You many or may not be able to get away with the first setting depending on 
how you structured your css. In our project we tried to minimize the amount 
of code generation. We have about 250 uibinder files and 300,000 lines of 
code. For client bundles, we have very significant sharing of CSS by 
composing multiple standard CSS classes e.g. 




addStyleNames="{ocs.css.btnBlueWithCursor} {ocs.css.marginLeft2u}"


Our RPC is built on a custom code generator that generates JSO based classes 
from java command / data objects. The nice thing about this approach is the 
code size is very small and

we only rely on the browser JSON serialization so it is very fast. The downside 
is that you can't share logic on the client/server.

However, we are looking at migrating to JsInterop which will allow code sharing 
as well.


The end result is that our app takes about 80 seconds to do a cold compile for 
1 permutation and about 2/3 seconds on a typical SDM refresh. 

The obfuscated size of minified bundle is 2.6 MB uncompressed and around 1MB 
gzipped.





On Wednesday, April 12, 2017 at 9:20:44 AM UTC-4, Marcin Okraszewski wrote:
>
> It turns out, AutoBeans generate 250k lines of code! This is compared to 
> 550k written by us. But this is still just a tip of an iceberg. When we dig 
> further into code generation output, it turns out we have overall 1.5 M 
> lines of code generated, so 3x more than we have written! It is mostly 
> attributed to UiBinder (over 800k lines), client bundles (200k) and 
> mentioned auto beans (250k). Thanks for hint for hint with RPC - that 
> pushed us in right direction. 
>
> Does any one have idea what to do with UiBinders? Or still some other 
> ideas what to try?
>
> Thanks,
> Marcin
>
>
> On Tuesday, 11 April 2017 17:31:43 UTC+2, Marcin Okraszewski wrote:
>>
>> Good hint. In our case we don't use GWT-RPC, but AutoBeans for REST. 
>> Though looking into compile report, it seems it wasn't best choice either, 
>> as it seems to generate a lot of code too :-( Will need to look after a 
>> replacement. JsInterop would be best here ... I wish it supported 
>> collections... 
>>
>> Thanks!
>> Marcin
>>
>>
>> On Tuesday, 11 April 2017 17:19:53 UTC+2, Juan Pablo Gardella wrote:
>>>
>>> Also check the classes that are used by GWT-RPC. For example if those 
>>> classes are using List instead of ArrayList for example, will generate more 
>>> JS output.
>>>
>>> On Tue, 11 Apr 2017 at 12:13 Jens  wrote:
>>>

 Our optimized output with collapse all is 23 MB. Things are reused 
> though, which is visible in left-over taking 6 MB. 
>

 How large is a single permutation (= not using collapse-all)? Our app 
 is roughly 300KLOC and results in roughly 6-7MB optimized JS for a single 
 permutation when doing a production build. In total we generate 3 
 permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT 
 compiler with just 4GB Heap space configured for the JVM. Seems weird that 
 you need 16GB for a build that probably isn't that different.

 Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, 
 a 3rd party JS lib for graphs. 

 Maybe your issue is some 3rd party generator that simply consumes way 
 to much memory and should be fixed / optimized? Have you run SDM / GWT 
 Compiler in debug mode and attached a debugger to it so you can make a 
 heap 
 dump once heap is quite high to see who is consuming all the memory?

 -- J.

 -- 
 You received this message because you are subscribed to the Google 
 Groups "GWT Users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to google-web-toolkit+unsubscr...@googlegroups.com.
 To post to this group, send email to google-we...@googlegroups.com.
 Visit this group at https://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.

>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-12 Thread Marcin Okraszewski
It turns out, AutoBeans generate 250k lines of code! This is compared to 
550k written by us. But this is still just a tip of an iceberg. When we dig 
further into code generation output, it turns out we have overall 1.5 M 
lines of code generated, so 3x more than we have written! It is mostly 
attributed to UiBinder (over 800k lines), client bundles (200k) and 
mentioned auto beans (250k). Thanks for hint for hint with RPC - that 
pushed us in right direction. 

Does any one have idea what to do with UiBinders? Or still some other ideas 
what to try?

Thanks,
Marcin


On Tuesday, 11 April 2017 17:31:43 UTC+2, Marcin Okraszewski wrote:
>
> Good hint. In our case we don't use GWT-RPC, but AutoBeans for REST. 
> Though looking into compile report, it seems it wasn't best choice either, 
> as it seems to generate a lot of code too :-( Will need to look after a 
> replacement. JsInterop would be best here ... I wish it supported 
> collections... 
>
> Thanks!
> Marcin
>
>
> On Tuesday, 11 April 2017 17:19:53 UTC+2, Juan Pablo Gardella wrote:
>>
>> Also check the classes that are used by GWT-RPC. For example if those 
>> classes are using List instead of ArrayList for example, will generate more 
>> JS output.
>>
>> On Tue, 11 Apr 2017 at 12:13 Jens  wrote:
>>
>>>
>>> Our optimized output with collapse all is 23 MB. Things are reused 
 though, which is visible in left-over taking 6 MB. 

>>>
>>> How large is a single permutation (= not using collapse-all)? Our app is 
>>> roughly 300KLOC and results in roughly 6-7MB optimized JS for a single 
>>> permutation when doing a production build. In total we generate 3 
>>> permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT 
>>> compiler with just 4GB Heap space configured for the JVM. Seems weird that 
>>> you need 16GB for a build that probably isn't that different.
>>>
>>> Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, a 
>>> 3rd party JS lib for graphs. 
>>>
>>> Maybe your issue is some 3rd party generator that simply consumes way to 
>>> much memory and should be fixed / optimized? Have you run SDM / GWT 
>>> Compiler in debug mode and attached a debugger to it so you can make a heap 
>>> dump once heap is quite high to see who is consuming all the memory?
>>>
>>> -- J.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "GWT Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-we...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-11 Thread Marcin Okraszewski
Good hint. In our case we don't use GWT-RPC, but AutoBeans for REST. Though 
looking into compile report, it seems it wasn't best choice either, as it 
seems to generate a lot of code too :-( Will need to look after a 
replacement. JsInterop would be best here ... I wish it supported 
collections... 

Thanks!
Marcin


On Tuesday, 11 April 2017 17:19:53 UTC+2, Juan Pablo Gardella wrote:
>
> Also check the classes that are used by GWT-RPC. For example if those 
> classes are using List instead of ArrayList for example, will generate more 
> JS output.
>
> On Tue, 11 Apr 2017 at 12:13 Jens  
> wrote:
>
>>
>> Our optimized output with collapse all is 23 MB. Things are reused 
>>> though, which is visible in left-over taking 6 MB. 
>>>
>>
>> How large is a single permutation (= not using collapse-all)? Our app is 
>> roughly 300KLOC and results in roughly 6-7MB optimized JS for a single 
>> permutation when doing a production build. In total we generate 3 
>> permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT 
>> compiler with just 4GB Heap space configured for the JVM. Seems weird that 
>> you need 16GB for a build that probably isn't that different.
>>
>> Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, a 
>> 3rd party JS lib for graphs. 
>>
>> Maybe your issue is some 3rd party generator that simply consumes way to 
>> much memory and should be fixed / optimized? Have you run SDM / GWT 
>> Compiler in debug mode and attached a debugger to it so you can make a heap 
>> dump once heap is quite high to see who is consuming all the memory?
>>
>> -- J.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-11 Thread Juan Pablo Gardella
Also check the classes that are used by GWT-RPC. For example if those
classes are using List instead of ArrayList for example, will generate more
JS output.

On Tue, 11 Apr 2017 at 12:13 Jens  wrote:

>
> Our optimized output with collapse all is 23 MB. Things are reused though,
> which is visible in left-over taking 6 MB.
>
>
> How large is a single permutation (= not using collapse-all)? Our app is
> roughly 300KLOC and results in roughly 6-7MB optimized JS for a single
> permutation when doing a production build. In total we generate 3
> permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT
> compiler with just 4GB Heap space configured for the JVM. Seems weird that
> you need 16GB for a build that probably isn't that different.
>
> Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, a
> 3rd party JS lib for graphs.
>
> Maybe your issue is some 3rd party generator that simply consumes way to
> much memory and should be fixed / optimized? Have you run SDM / GWT
> Compiler in debug mode and attached a debugger to it so you can make a heap
> dump once heap is quite high to see who is consuming all the memory?
>
> -- J.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-11 Thread Jens


> Our optimized output with collapse all is 23 MB. Things are reused though, 
> which is visible in left-over taking 6 MB. 
>

How large is a single permutation (= not using collapse-all)? Our app is 
roughly 300KLOC and results in roughly 6-7MB optimized JS for a single 
permutation when doing a production build. In total we generate 3 
permutations (Firefox, IE, Chrome). However we use SuperDevMode / GWT 
compiler with just 4GB Heap space configured for the JVM. Seems weird that 
you need 16GB for a build that probably isn't that different.

Libraries are kind of standard I guess: GWT-RPC, UiBinder, Google GIN, a 
3rd party JS lib for graphs. 

Maybe your issue is some 3rd party generator that simply consumes way to 
much memory and should be fixed / optimized? Have you run SDM / GWT 
Compiler in debug mode and attached a debugger to it so you can make a heap 
dump once heap is quite high to see who is consuming all the memory?

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-11 Thread Marcin Okraszewski
Hi,
Thanks. That sounds much more doable. Unfortunately we don't have such 
natural big logic to extract. Everything is very mych spread around across 
different views. The views are in fact pretty much separate, to the extent 
we can compile different set of views for development purposes (super dev 
mode). But at the end the application is one. Of course one way would be to 
split it into separate applications, but then unfortunately you would need 
to wait for loading different apps, whenever you navigating between 
different parts of application. So it the split would be to some extent 
artificial.

Our optimized output with collapse all is 23 MB. Things are reused though, 
which is visible in left-over taking 6 MB. 

>From things we tried so far. We already use draft and validate only 
compilations, wherever possible. All machines have SSDs. We looked into the 
incremental compilation, but seems not to work for regular builds, just for 
the super dev mode. We also looked at precompiling modules (the application 
consists of number of modules); I found the module compiler producing 
gwtar, but seems it is gone in 2.8. The idea with separate apps in one page 
is nice, but seems difficult for us as the shared parts are having a wide 
API; but we will for sure research it further. 

Any other ideas maybe?

Thank you,
Marcin

P.S.
Sorry for "mumbling" in last email - I shouldn't answer late in night.


On Tuesday, 11 April 2017 12:58:15 UTC+2, Kirill Prazdnikov wrote:
>
> We have detached a complex script projectional editor with completion. 
> The interface was very easy - to provide containing element, context for 
> completion, the script itself and callbacks for saving the scripts.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-11 Thread Kirill Prazdnikov
We have detached a complex script projectional editor with completion. 
The interface was very easy - to provide containing element, context for 
completion, the script itself and callbacks for saving the scripts.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Marcin Okraszewski
That is a nice idea. Actually compiling modules as separate entities was 
definitely something would helped. ModuleCompiler that was producing gwtar 
output, but looks like it was dropped in 2.8. 

Now I wonder if that approach is applicable to us. We have a pretty 
extensive "common" module, which provides some shared services, eg. for 
syncing data with server. Then we have also our widgets, shared resources, 
etc. Then we have modules with views of various parts of our system (eg. 
configuration, reporting, ...). Everything is a GWTP application.

I can potentially imagine that we can move implementation of GWTP 
presenters & views into those separate GWT applications, but still would 
need to make stubs for every name token in the GWTP "master" application. 
But at the end GWTP is inserting widgets into UI slots. The widgets from 
different GWT applications at the same page, would have nothing in common, 
so would they work together (put a widget from one app, into second)? I 
guess would need to expose some widget wrapper, that would pass some basic 
widget lifecycle events. And of course, each GWT app would have its version 
of base GWT widgets, as I couldn't import those from same base module into 
every app. At least unless we switched the widgets out for GWT widget 
system.

Am I on the right track? Looks really heavy refactoring ...

Thanks,
Marcin

On Monday, 10 April 2017 21:34:10 UTC+2, Daniel Kurka wrote:
>
> There is a whitelist / blacklist to control that.
>
> On Mon, Apr 10, 2017 at 12:30 PM Kirill Prazdnikov  > wrote:
>
>> As far as I know this will add lots of GWT internal stuff which I not 
>> going to export. Right ? 
>>
>> понедельник, 10 апреля 2017 г., 21:57:33 UTC+3 пользователь Daniel Kurka 
>> написал:
>>
>>> If you compile your gwt app with -generateJsInteropExports any @JsType 
>>> is accessible in global scope:
>>>

 -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Jens


> As far as I know this will add lots of GWT internal stuff which I not 
> going to export. Right ? 
>

If you are willing to use master branch you can apply filters during 
compilation: 

https://github.com/gwtproject/gwt/commit/9eda5dc418f9bdfef2fd21c6113e48dd10672beb
 

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Daniel Kurka
There is a whitelist / blacklist to control that.

On Mon, Apr 10, 2017 at 12:30 PM Kirill Prazdnikov 
wrote:

> As far as I know this will add lots of GWT internal stuff which I not
> going to export. Right ?
>
> понедельник, 10 апреля 2017 г., 21:57:33 UTC+3 пользователь Daniel Kurka
> написал:
>
> If you compile your gwt app with -generateJsInteropExports any @JsType is
> accessible in global scope:
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Kirill Prazdnikov
As far as I know this will add lots of GWT internal stuff which I not going 
to export. Right ? 

понедельник, 10 апреля 2017 г., 21:57:33 UTC+3 пользователь Daniel Kurka 
написал:
>
> If you compile your gwt app with -generateJsInteropExports any @JsType is 
> accessible in global scope:
>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Daniel Kurka
If you compile your gwt app with -generateJsInteropExports any @JsType is
accessible in global scope:

Exporting app:

package foo;

@JsType
public Bar {
  public Baz baz = new Baz();
}

Consuming JS:
new Bar().baz.baz1();

Consuming gwt app ( No need for -generateJsInteropExports):

@JsType(isNative = true, name = Bar, namespace = "foo")
public class Bar {
  Baz baz;
}



On Mon, Apr 10, 2017 at 11:45 AM Kirill Prazdnikov 
wrote:

> You can also use DOM Elememts as an interop types.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Kirill Prazdnikov
You can also use DOM Elememts as an interop types.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Kirill Prazdnikov
The approach is very simple and easy, you use you detached GWT app like any 
other JS script.
Any GWT app is a JS script.

1st you need to define the interface of the detached module in terms of 
JsInterop: isNative = true.
You can only use Strings, numbers, arrays and isNative = true interfaces. No 
Java types.

@JsType(isNative = true)
public interface Interface {
  @JsMethod Double computeSomething(String arg);
  @JsMethod Disposable fetchData(Consumer arg);
}

2nd you implement the interface and use Window.* namespace to communicate 
between modules:

  class Exports {
@JsProperty(namespace = JsPackage.GLOBAL)
public static native void setInterface(Interface value);
  }
  Exports.setInterface(new Implementation());
 
3rd - use the interface in a main program:

  class Imports {
@JsProperty(namespace = JsPackage.GLOBAL)
public static native Interface getInterface();
  }

Runnable onLoad = () -> {
  Interface i = Imports.getInterface();
  i2.computeSomething("test1");
};

Runnable onError = () ->{
  JsGlobals.getWindow().getConsole().log("onError");
};

ModuleLoader.loadModule(
"jsExport/jsExport.nocache.js",
progressBar,
onLoad,
onError
);

Where ModuleLoader loads the script via script element: 

Document document = JsGlobals.getDocument();
HTMLScriptElement scriptElement = document.createScriptElement();
scriptElement.setSrc(name);
scriptElement.setOnerror(event -> onError.run());
scriptElement.setOnload(new State()::schedule);

document.getHead().appendChild(scriptElement);


We use timer to understand if the module loading is completed, however other 
ways are possible:

  private Runnable waitForObject = () -> {
if (isLoaded.apply()) {
  onLoad.run();
} else {
  schedule();
}
  };

  private ScheduledCommand timerCallback = () -> waitForObject.run();

  private void schedule() {
JsGlobals.getWindow().setTimeout(timerCallback, 17);
  }

You may have both modules in a single maven module, but different .gwt.xml 
files.
We unite modules for the module system testing, but not for production. 
In production we have two separate maven modules.
We use single permutation for all browsers (for Chrome) and we don`t have any 
issues with other browsers.

 
  
  



  
  


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Compilation of a large GWT application?

2017-04-10 Thread Frank Hossfeld
@Kirill: Do you have an example how the splitting will work?

Am Sonntag, 9. April 2017 10:54:50 UTC+2 schrieb Kirill Prazdnikov:
>
> Think about to split your app into several apps and interop between them 
> via jsinterop. We did that and detach 1 mb of genersted js app. 
>
> Our app is pretty big, resulting js is 3mb, we use single perm for all 
> browsers and not using gwt i18n. 
>
> But you can not use any java type to interop between apps like list or 
> map. You can only use strings, arrays, numbers and js interop interfaces
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Compilation of a large GWT application?

2017-04-09 Thread Kirill Prazdnikov
Think about to split your app into several apps and interop between them via 
jsinterop. We did that and detach 1 mb of genersted js app. 

Our app is pretty big, resulting js is 3mb, we use single perm for all browsers 
and not using gwt i18n. 

But you can not use any java type to interop between apps like list or map. You 
can only use strings, arrays, numbers and js interop interfaces

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Compilation of a large GWT application?

2017-04-06 Thread Marcin Okraszewski


Hi,

We are working with a rather big GWT application. It is currently over 500 
thousand lines of code, plus dependencies and code generated from 
GWT.create(). Our biggest pain is currently RAM usage and compilation time. 
We are getting close to 16 GB RAM for build, which is big on its own but on 
top of that we cannot upgrade further some machines (eg. Macbook Pro). The 
draft compilation time on typical dev machine takes about 20 minutes (one 
permutation via collapse all properties).

 

*Is there a way to bring down the RAM usage and compilation time? *
 

Thanks for help!

Marcin


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.