For development purposes you could try the following in your .gwt.xml file

<set-configuration-property name="CssResource.obfuscationPrefix" value="empty" 
/>
<set-configuration-property name="UiBinder.useSafeHtmlTemplates" value="false"/>


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. 

<ui:with field='ocs' type='com.ocs.client.ui.OcsResource' />


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 <jens.ne...@gmail.com> 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.

Reply via email to