Wednesday, November 30, 2016

Re: GWT 2.8 generates code 14% bigger than GWT 2.7

Please try single permutation
  <set-property name="user.agent" value="safari"/>


On Thu, Dec 1, 2016 at 1:50 AM, Slava Pankov <pankovs@gmail.com> wrote:
SSO is not working for my project, I cannot successfully compile with it.
Put the following to my gwt.xml, but no luck:

<inherits name="com.google.gwt.core.Core" />
<collapse-all-properties />
<add-linker name="sso" />


On Tuesday, November 29, 2016 at 6:44:37 AM UTC-8, Kirill Prazdnikov wrote:

Do you use SSO ? SSO script is smaller then no SSO. Did you run CC on it ?


29 нояб. 2016 г. 17:29 пользователь "Etienne Basso" <ebas...@gmail.com> написал:

Hi Ignacio,

This is not only about loading time over the network, but also about script parsing by the web browser. 
In 98% of the case this is not an issue, but I have a very specific use case were the code is directly embedded on a special device which doesn't even have a real CPU but an ASIC emulating one. This device is really really not powerful and GWT is the only framework providing decent speed.  I noticed significant differences in the script parsing delay as js sources are getting bigger.

In my case 100KB are a huge deal.

Le samedi 26 novembre 2016 09:56:27 UTC+1, Ignacio Baca Moreno-Torres a écrit :
But IMO if you really care user experience you have other places to improve your page. I thinks updating to the last version is always a good idea, if any security or compatibility blocker problem is detected in your version you will need to update, and having a old version won't help. Also this helps move forward the community and the lib (GWT), because everyone focused in the last version, also focus the issues and improvements in that version.

The small step back eliminating the closure compiler just increase a bit the code size of your app. But 100k?! did you see the trends and the average code size of webs? http://httparchive.org/trends.php?s=All&minlabel=Nov+15+2014&maxlabel=Nov+1+2016, you should note that even google.com uses 500k in 13request to load, and it's ""just"" a text inbox in the center of your window (http://httparchive.org/viewsite.php?pageid=70036564).

I might be wrong, but probably trying to embed the app.nocache.js in your index.html will gain some milliseconds, probably just that dummy change will get more ms than the cache-ables 100k you have lose without the closure pass. If your app is quite big, various MBs, you should take care than the first split point load a minimum as possible to show something to the user. But, in your case, less than a 1M, I think that using split point is not a good idea. Your code will get cached, and most of static apps already has more than 500k of JS, so your single page app having a 500k-1M of JS is pretty reasonable.

You can go forward and apply the progressive web concepts (https://developers.google.com/web/progressive-web-apps/checklist). Pretty sure you get there without the closure compiler ;). Service workers will allow maximum control to preload other split point or resources, and to absolutely control how your app caches, so you can use previous version, load the next one and in the next page reload the new app version will be used. This is not easy at all, but... some time we focus on the optimization we have no control of (like the closure pass) and we don't apply other we have control of, but that requires our effort.

So, 😀 update to GWT 2.8! it's awesome!, try other solutions to improve page loads and share how you do it!

On Friday, November 25, 2016 at 10:39:44 PM UTC+1, Slava Pankov wrote:
@Jens

I've tried WITHOUT any success to use closure compiler externally with GWT 2.8
Still want to find out exact steps to get it working :-(


On Friday, November 25, 2016 at 2:43:11 AM UTC-8, Kirill Prazdnikov wrote:

Hi Jens,

What if we have SSO linker ?
Then no hacks is needed, right ?
Then just run the Google Closure Compiler on the output.

--

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/IIQk4xH0-g8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@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+unsubscribe@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: GWT 2.8 generates code 14% bigger than GWT 2.7

SSO is not working for my project, I cannot successfully compile with it.
Put the following to my gwt.xml, but no luck:

<inherits name="com.google.gwt.core.Core" />
<collapse-all-properties />
<add-linker name="sso" />


On Tuesday, November 29, 2016 at 6:44:37 AM UTC-8, Kirill Prazdnikov wrote:

Do you use SSO ? SSO script is smaller then no SSO. Did you run CC on it ?


29 нояб. 2016 г. 17:29 пользователь "Etienne Basso" <ebas...@gmail.com> написал:
Hi Ignacio,

This is not only about loading time over the network, but also about script parsing by the web browser. 
In 98% of the case this is not an issue, but I have a very specific use case were the code is directly embedded on a special device which doesn't even have a real CPU but an ASIC emulating one. This device is really really not powerful and GWT is the only framework providing decent speed.  I noticed significant differences in the script parsing delay as js sources are getting bigger.

In my case 100KB are a huge deal.

Le samedi 26 novembre 2016 09:56:27 UTC+1, Ignacio Baca Moreno-Torres a écrit :
But IMO if you really care user experience you have other places to improve your page. I thinks updating to the last version is always a good idea, if any security or compatibility blocker problem is detected in your version you will need to update, and having a old version won't help. Also this helps move forward the community and the lib (GWT), because everyone focused in the last version, also focus the issues and improvements in that version.

The small step back eliminating the closure compiler just increase a bit the code size of your app. But 100k?! did you see the trends and the average code size of webs? http://httparchive.org/trends.php?s=All&minlabel=Nov+15+2014&maxlabel=Nov+1+2016, you should note that even google.com uses 500k in 13request to load, and it's ""just"" a text inbox in the center of your window (http://httparchive.org/viewsite.php?pageid=70036564).

I might be wrong, but probably trying to embed the app.nocache.js in your index.html will gain some milliseconds, probably just that dummy change will get more ms than the cache-ables 100k you have lose without the closure pass. If your app is quite big, various MBs, you should take care than the first split point load a minimum as possible to show something to the user. But, in your case, less than a 1M, I think that using split point is not a good idea. Your code will get cached, and most of static apps already has more than 500k of JS, so your single page app having a 500k-1M of JS is pretty reasonable.

You can go forward and apply the progressive web concepts (https://developers.google.com/web/progressive-web-apps/checklist). Pretty sure you get there without the closure compiler ;). Service workers will allow maximum control to preload other split point or resources, and to absolutely control how your app caches, so you can use previous version, load the next one and in the next page reload the new app version will be used. This is not easy at all, but... some time we focus on the optimization we have no control of (like the closure pass) and we don't apply other we have control of, but that requires our effort.

So, 😀 update to GWT 2.8! it's awesome!, try other solutions to improve page loads and share how you do it!

On Friday, November 25, 2016 at 10:39:44 PM UTC+1, Slava Pankov wrote:
@Jens

I've tried WITHOUT any success to use closure compiler externally with GWT 2.8
Still want to find out exact steps to get it working :-(


On Friday, November 25, 2016 at 2:43:11 AM UTC-8, Kirill Prazdnikov wrote:

Hi Jens,

What if we have SSO linker ?
Then no hacks is needed, right ?
Then just run the Google Closure Compiler on the output.

--

--
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+unsubscribe@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: GWT 2.8 compile fails; 2.7 works


My question is: Should this have failed in GWT 2.7? Or is there a bug in GWT 2.8?

Given that the error message

The interface UiBinder cannot be implemented more than once with different arguments: UiBinder<CollectionManagementLayout,SomeViewImpl> and UiBinder<CollectionManagementLayout,SomeViewImpl>

already sounds dumb (arguments are both the same and not different), I would guess its a bug. If you can create a small, self contained example project that demonstrates the issue you should file a bug on github.

-- 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+unsubscribe@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: GWT 2.8 compile fails; 2.7 works


Oops! I do get the error.

Your error is a different one. Your error means you either have GWT 2.7 and 2.8 on classpath or some of your 3rd party libraries have bundled some older copies of UiBinder generator files.

-- 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+unsubscribe@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: GWT 2.8 compile fails; 2.7 works

Here's the remainder of the stack trace

 at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
 
... 46 more
           
[ERROR] at Loader.java(29): GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JMethodCall
           
[ERROR] at Loader.java(29): (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JCastOperation
           
[ERROR] at Loader.java(29): static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JDeclarationStatement
           
[ERROR] at Loader.java(24): {
 
Composite.$clinit();
 
static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class);
}
               com
.google.gwt.dev.jjs.ast.JBlock
           
[ERROR] at Loader.java(24): {
 
Composite.$clinit();
 
static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class);
}
               com
.google.gwt.dev.jjs.ast.JMethodBody
           
[ERROR] at Loader.java(24): com.snkv.peruse.client.Loader.$clinit()V
               com
.google.gwt.dev.jjs.ast.JMethod
     
[ERROR] Compiler returned false


On Wednesday, November 30, 2016 at 2:45:35 PM UTC-5, Velusamy Velu wrote:
Oops! I do get the error. I was wrong when I said it worked for me. When I attempted to change the GWT version from 2.7.0 to 2.8.0 in eclipse, eclipse switched it back to 2.7.0 for reasons I cannot figure out. Given below are the offending UiBinder code, the corresponding Java code, and the stack trace when switching a running application from GWT 2.7 to 2.8. Any help would be greatly appreciated.

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
  xmlns:g="urn:import:com.google.gwt.user.client.ui"
 
xmlns:m="urn:import:gwt.material.design.client.ui">
 
<g:HTMLPanel>
   
<g:PopupPanel ui:field="launchPad" styleName="launch">
          <m:MaterialColumn ui:field="container" shadow="3">
                  <!-- Dialog title -->
                  <m:MaterialPanel styleName="centeredContentDiv peruseStandardBackground noPadding">
                    <m:MaterialLabel styleName="launchTitle">PeruseLab - Loading your drawings...</m:MaterialLabel>
                    <m:MaterialProgress type="INDETERMINATE" enabled="false" ui:field="progressBar" />
                    <!-- The above shows the progress bar while retrieving drawing(s) for user -->
                  </m:MaterialPanel>
               </m:MaterialColumn>
            </g:PopupPanel>
      </g:HTMLPanel>
</ui:UiBinder>

public class Loader extends Composite {

   
interface LoaderUiBinder extends UiBinder<Widget, Loader> {
   
}

    
private static LoaderUiBinder uiBinder = GWT.create(LoaderUiBinder.class);

   
@UiField
   
PopupPanel launchPad;

    
@UiField
   
MaterialColumn container;

    
public Loader() {
        initWidget
(uiBinder.createAndBindUi(this));
   
}

    public void hide() {
        clear
();
        launchPad
.hide(true);
   
}

   
public void show() {
        launchPad
.show();
   
}

    private void clear() {
       
while (container.getWidgetCount() > 0) {
            container
.remove(0);
       
}
   
}
}


Caused by: java.lang.NoSuchMethodError: com.google.gwt.uibinder.rebind.UiBinderWriter.<init>(Lcom/google/gwt/core/ext/typeinfo/JClassType;Ljava/lang/String;Ljava/lang/String;Lcom/google/gwt/core/ext/typeinfo/TypeOracle;Lcom/google/gwt/uibinder/rebind/MortalLogger;Lcom/google/gwt/uibinder/rebind/FieldManager;Lcom/google/gwt/uibinder/rebind/messages/MessagesWriter;Lcom/google/gwt/uibinder/rebind/DesignTimeUtils;Lcom/google/gwt/uibinder/rebind/UiBinderContext;ZZLjava/lang/String;Lcom/google/gwt/dev/resource/ResourceOracle;Lcom/google/gwt/resources/rg/GssResourceGenerator$GssOptions;)V
 at com
.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:174)
 at com
.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:128)
 at com
.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
 at com
.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
 at com
.google.<span style="color: #000;" class="styled-by-pret

--
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+unsubscribe@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: GWT 2.8 compile fails; 2.7 works

Oops! I do get the error. I was wrong when I said it worked for me. When I attempted to change the GWT version from 2.7.0 to 2.8.0 in eclipse, eclipse switched it back to 2.7.0 for reasons I cannot figure out. Given below are the offending UiBinder code, the corresponding Java code, and the stack trace when switching a running application from GWT 2.7 to 2.8. Any help would be greatly appreciated.

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
  xmlns:g="urn:import:com.google.gwt.user.client.ui"
 
xmlns:m="urn:import:gwt.material.design.client.ui">
 
<g:HTMLPanel>
   
<g:PopupPanel ui:field="launchPad" styleName="launch">
          <m:MaterialColumn ui:field="container" shadow="3">
                  <!-- Dialog title -->
                  <m:MaterialPanel styleName="centeredContentDiv peruseStandardBackground noPadding">
                    <m:MaterialLabel styleName="launchTitle">PeruseLab - Loading your drawings...</m:MaterialLabel>
                    <m:MaterialProgress type="INDETERMINATE" enabled="false" ui:field="progressBar" />
                    <!-- The above shows the progress bar while retrieving drawing(s) for user -->
                  </m:MaterialPanel>
               </m:MaterialColumn>
            </g:PopupPanel>
      </g:HTMLPanel>
</ui:UiBinder>

public class Loader extends Composite {

   
interface LoaderUiBinder extends UiBinder<Widget, Loader> {
   
}

    
private static LoaderUiBinder uiBinder = GWT.create(LoaderUiBinder.class);

   
@UiField
   
PopupPanel launchPad;

    
@UiField
   
MaterialColumn container;

    
public Loader() {
        initWidget
(uiBinder.createAndBindUi(this));
   
}

    public void hide() {
        clear
();
        launchPad
.hide(true);
   
}

   
public void show() {
        launchPad
.show();
   
}

    private void clear() {
       
while (container.getWidgetCount() > 0) {
            container
.remove(0);
       
}
   
}
}


Caused by: java.lang.NoSuchMethodError: com.google.gwt.uibinder.rebind.UiBinderWriter.<init>(Lcom/google/gwt/core/ext/typeinfo/JClassType;Ljava/lang/String;Ljava/lang/String;Lcom/google/gwt/core/ext/typeinfo/TypeOracle;Lcom/google/gwt/uibinder/rebind/MortalLogger;Lcom/google/gwt/uibinder/rebind/FieldManager;Lcom/google/gwt/uibinder/rebind/messages/MessagesWriter;Lcom/google/gwt/uibinder/rebind/DesignTimeUtils;Lcom/google/gwt/uibinder/rebind/UiBinderContext;ZZLjava/lang/String;Lcom/google/gwt/dev/resource/ResourceOracle;Lcom/google/gwt/resources/rg/GssResourceGenerator$GssOptions;)V
 at com
.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:174)
 at com
.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:128)
 at com
.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
 at com
.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
 at com
.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
 at com
.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
 at com
.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
 at com
.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
 at com
.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
 at com
.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
 at com
.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
 at com
.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
 at com
.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
 at com
.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
 at com
.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
 at com
.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
 
... 46 more
           
[ERROR] at Loader.java(29): GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JMethodCall
           
[ERROR] at Loader.java(29): (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JCastOperation
           
[ERROR] at Loader.java(29): static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class)
               com
.google.gwt.dev.jjs.ast.JDeclarationStatement
           
[ERROR] at Loader.java(24): {
 
Composite.$clinit();
 
static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class);
}
               com
.google.gwt.dev.jjs.ast.JBlock
           
[ERROR] at Loader.java(24): {
 
Composite.$clinit();
 
static Loader$LoaderUiBinder uiBinder = (Loader$LoaderUiBinder) GWT.create(Loader$LoaderUiBinder.class);
}
               com
.google.gwt.dev.jjs.ast.JMethodBody
           
[ERROR] at Loader.java(24): com.snkv.peruse.client.Loader.$clinit()V
               com
.google.gwt.dev.jjs.ast.JMethod
     
[ERROR] Compiler returned false
     
[WARN] recompile failed


On Monday, November 21, 2016 at 4:07:42 PM UTC-5, jgindin wrote:
In our app, we have a UiBinder widget (SomeViewImpl) which has, as its root element, a widget which itself is a UiBinder widget (CollectionManagementLayout).

My UiBinder declaration in SomeViewImpl looks like this:
interface CollectionManagementPanelUiBinder extends UiBinder<CollectionManagementLayout, SomeViewImpl> {}


The UiBinder XML for the SomeViewImpl class starts off like this:
  <collectionmanagement:CollectionManagementLayout ui:field="layout">
    . . . 
  </collectionmanagement:CollectionManagementLayout>



This code compiles just fine in GWT 2.7, but with 2.8, I get the following error:

[ERROR] Errors in 'generated://09CDEAB17C92C8C75AB00C9F2F0DF847/com/myco/myproduct/client/stuff/collections/SomeViewImpl_CollectionManagementPanelUiBinderImpl.java'
      [ERROR] Line 17: The interface UiBinder cannot be implemented more than once with different arguments: UiBinder<CollectionManagementLayout,SomeViewImpl> and UiBinder<CollectionManagementLayout,SomeViewImpl>
      See snapshot: /tmp/com.myco.myproduct.client.stuff.collections.SomeViewImpl_CollectionManagementPanelUiBinderImpl3472216513944602205.java
   Tracing compile failure path for type 'com.myco.myproduct.client.stuff.collections.SomeViewImpl_CollectionManagementPanelUiBinderImpl'
      [ERROR] Errors in 'generated://09CDEAB17C92C8C75AB00C9F2F0DF847/com/myco/myproduct/client/stuff/collections/SomeViewImpl_CollectionManagementPanelUiBinderImpl.java'
         [ERROR] Line 17: The interface UiBinder cannot be implemented more than once with different arguments: UiBinder<CollectionManagementLayout,SomeViewImpl> and UiBinder<CollectionManagementLayout,SomeViewImpl>



The generated code looks like this:
public class SomeViewImpl_CollectionManagementPanelUiBinderImpl 
  implements UiBinder<CollectionManagementLayout, SomeViewImpl>, 
  SomeViewImpl.CollectionManagementPanelUiBinder {


I worked around this by changing the UiBinder declaration in SomeViewImpl to be:
interface CollectionManagementPanelUiBinder extends UiBinder<Widget, SomeViewImpl> {}


My question is: Should this have failed in GWT 2.7? Or is there a bug in GWT 2.8?

thanks,

jay

--
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+unsubscribe@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.