Re: My CellTable is slow and I don't know why

2013-08-19 Thread Thomas Broyer


On Sunday, August 11, 2013 12:02:24 PM UTC+2, Nuno Godinho de Matos wrote:

 It runs the DevMode main class, ture.
 But I am quite certain mvn gwt:run is fueling me the compiled javascript.
 The project compilation time is huge for making the gecko_1_3 and safari 
 permutations (since I am testing in both chrome and firefox).
 What would be the point of compiling all that java into javascript if the 
 gwt:run would later not use the compiled javascript.


It depends on your Maven build. Generally, gwt:compile is attached to the 
prepare-package phase so that it doesn't run when you only need to 
compile/process-classes like gwt:run does.
 

 Moreover, if in the module user.agent property I take away the compilation 
 for gecko, when I load the page with firefox I get alarms that there is no 
 compiled javascript for my user agent.


If you don't have the ?gwt.codesvr= in your URL then yes it's possible that 
you're running the compiled JS code served by the DevMode embedded HTTP 
server.
If you want to run in prod mode, better use mvn jetty:run though.

What i am going to check out first is weather or not the dead weight of the 
 cell table is not related to the DOM structure of my GWT components tree. 
 Such as, for example, laying the table within the bootstrap grid model. 
 Potentially, each of these nested page components that are being used for 
 layout or whatever else, are all like the cell table implementation crowing 
 up the application with mouseover, mouseout events. You put the mouse on 
 top of a cell table row, and there goes a mouse over buble up to kingdom 
 come.

 I am considering that It is possible that this drag on performance has to 
 do with a by default spamming of dom events. Events running from the 
 bottom of the DOM tree up to the very top element, all bubbling and lagging 
 up.
 So what I am going to try out this time, is to dump the cell table outside 
 the overall page layout, so that there aren't any OnWhatever events to 
 buble up to.

 Let's see if that is is the problem.
 And if that is indeed the problem, Christ!, you do have to be ever careful 
 with most of the gwt components you use cause they just booby trap the html 
 elements with events you did not even know where being played out for you.


One thing that might help, if you don't need it, is to 
setSkipRowHoverStyleUpdate(true) and possibly setSkipRowHoverCheck(true) 
and/or setSkipRowHoverFloatElementCheck(true)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: My CellTable is slow and I don't know why

2013-08-11 Thread David
Hi,

Mouse-over on IE is also rather slow in compiled mode ( I see a lag of
about 500ms on my cell tables, nothing dramatic but still). I used to have
this problem in my own table implementation and I fixed it there by just
changing the color of the row directly instead of adding/removing
stylenames. That goes a lot faster on IE.

David

On Sun, Aug 11, 2013 at 12:43 AM, Jens jens.nehlme...@gmail.com wrote:



 The one triggered by mvn gwt:run is a disaster.
 Mouseout: 176 ms, mouseover 208 ms, according to speed tracer, but it
 looks even slower.


 gwt:run starts GWT's DevMode which is always a lot slower than compiled
 JavaScript. You should not measure timings in DevMode. Compile your app to
 JavaScript and try again.

 -- J.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: My CellTable is slow and I don't know why

2013-08-11 Thread Nuno Godinho de Matos
It runs the DevMode main class, ture.
But I am quite certain mvn gwt:run is fueling me the compiled javascript.
The project compilation time is huge for making the gecko_1_3 and safari 
permutations (since I am testing in both chrome and firefox).
What would be the point of compiling all that java into javascript if the 
gwt:run would later not use the compiled javascript.

Moreover, if in the module user.agent property I take away the compilation 
for gecko, when I load the page with firefox I get alarms that there is no 
compiled javascript for my user agent.


What i am going to check out first is weather or not the dead weight of the 
cell table is not related to the DOM structure of my GWT components tree. 
Such as, for example, laying the table within the bootstrap grid model. 
Potentially, each of these nested page components that are being used for 
layout or whatever else, are all like the cell table implementation crowing 
up the application with mouseover, mouseout events. You put the mouse on 
top of a cell table row, and there goes a mouse over buble up to kingdom 
come.

I am considering that It is possible that this drag on performance has to 
do with a by default spamming of dom events. Events running from the 
bottom of the DOM tree up to the very top element, all bubbling and lagging 
up.
So what I am going to try out this time, is to dump the cell table outside 
the overall page layout, so that there aren't any OnWhatever events to 
buble up to.

Let's see if that is is the problem.
And if that is indeed the problem, Christ!, you do have to be ever careful 
with most of the gwt components you use cause they just booby trap the html 
elements with events you did not even know where being played out for you.



On Sunday, August 11, 2013 12:43:43 AM UTC+2, Jens wrote:



 The one triggered by mvn gwt:run is a disaster.
 Mouseout: 176 ms, mouseover 208 ms, according to speed tracer, but it 
 looks even slower.


 gwt:run starts GWT's DevMode which is always a lot slower than compiled 
 JavaScript. You should not measure timings in DevMode. Compile your app to 
 JavaScript and try again.

 -- J.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: My CellTable is slow and I don't know why

2013-08-10 Thread Nuno Godinho de Matos

Christ!

I have never seen a hover effect so sluggish (probably because the 
hover/graying effect is being added programatically by CellTable 
implementation code of the mouse out and mouseover).

The online sample goes fast on the browser, 
http://www.gwtproject.org/doc/latest/DevGuideUiCellTable.html

The one triggered by mvn gwt:run is a disaster.
Mouseout: 176 ms, mouseover 208 ms, according to speed tracer, but it looks 
even slower.


I am basically using the standard css from GWT along with the css from 
twitter bootstrap.
I tried both the CellTable from bootstrap and from GWT both are just dead 
slow.
Firefox is considerably faster, but even there you feel the delay for the 
hover effect to show.

The table has the three rows of the example!

At this rate I will just have to extend the cell table and override the 
mouse out and mouseover events to simply do nothing.

I tried removing the bootstrap CSS, which I want to keep, but it also 
seemed to have no effect on the performance.


On Thursday, November 4, 2010 5:45:09 PM UTC+1, Owen Powell wrote:

 It looks like the problem might only exist when you test locally. At 
 least for me, when I upload to AppEngine my table is as responsive as 
 the Showcase table. 

 ~Owen 

 On 3 nov, 18:21, Owen Powell opow...@gmail.com wrote: 
  I checked the CellTable style sheet, it looks fine. But the standard 
  GWT stylesheet (the standard.css resource that gets loaded in my 
  app) contains a dependant style selector table td. 
  
  Could this be my problem? Can the standard style sheet somehow be 
  modified? 
  
  Best, 
  
  ~Owen 
  
  On 3 nov, 18:08, Owen Powell opow...@gmail.com wrote: 
  
  
  
  
  
  
  
   Thanks John, the problem definitely seems to be descendant style 
   selectors (since I see recurring Javascript calls in Speed Tracer). 
  
   But I'm not sure why this is, since I don't have any styles defined in 
   my app. Could it be that the default CellTable style file is creating 
   this problem? 
  
   ~Owen 
  
   On 3 nov, 16:25, John LaBanca jlaba...@google.com wrote: 
  
Have you tried looking at it with SpeedTracer?  We tested with large 
 tables 
(100 rows), and the hover code is pretty straight forward. 
  
In past applications, we've seen performance problems when hovering 
 due 
to descendant style selectors because of the way they are 
 implemented in 
browser. 
  
For example, you have this CSS style defined: 
.myRandomWidget td { 
  padding: 3px; 
  
} 
  
And you have a CellTable that is NOT myRandomWidget, then changing 
 the hover 
style of the row will cause some browsers to walk up from every TD 
 in the 
CellTable trying to match the style definition.  In the degenerate 
 case, 
where CellTable is not myRandomWidget, this means walking up to the 
 body 
element.  This is a native browser implementation, and the only 
 solution is 
to avoid descendant style selectors. 
  
If this isn't the case, SpeedTracer should be able to help you 
 narrow down 
the performance problem. 
  
Thanks, 
John LaBanca 
jlaba...@google.com 
  
On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell opow...@gmail.com 
 wrote: 
 I've only tested it on the latest stable build of Chrome. 
  
 On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote: 
  My CellTable is slow under Firefox 3.6 only. 
  
  On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote: 
  
   Hi everyone, 
  
   When I make a simple CellTable, the responsiveness of the 
 table in the 
   browser to mouse events (mouseOver, mouseOut) is nowhere 
 nearly as 
   fast as the table in the Showcase (
 http://gwt.google.com/samples/ 
   Showcase/Showcase.html#!CwCellTable). Any ideas why this might 
 be? 
  
   My code is below. Best, 
  
   ~Owen 
  
   // Data object class. 
  
   package tabletest.client; 
  
   import java.util.ArrayList; 
  
   public class InterestingThing { 
  
   public ArrayListString values = new 
 ArrayListString(); 
  
   public InterestingThing(int n) { 
   for (int i=0; in; i++) { 
   values.add(Value  + i); 
   } 
   } 
  
   } 
  
   // Custom CellTable class. 
  
   package tabletest.client; 
  
   import java.util.ArrayList; 
  
   import com.google.gwt.user.cellview.client.CellTable; 
   import com.google.gwt.user.cellview.client.TextColumn; 
  
   public class MyCellTable extends CellTableInterestingThing { 
  
   public MyCellTable() { 
   super(); 
  
   int NUM_COLUMNS = 4; 
   int NUM_ROWS = 25; 
  
   // Create table. 
   for (int i=0; iNUM_COLUMNS; i++) { 
   addTextColumn(i); 
   } 
  
   // Create 

Re: My CellTable is slow and I don't know why

2013-08-10 Thread Jens



 The one triggered by mvn gwt:run is a disaster.
 Mouseout: 176 ms, mouseover 208 ms, according to speed tracer, but it 
 looks even slower.


gwt:run starts GWT's DevMode which is always a lot slower than compiled 
JavaScript. You should not measure timings in DevMode. Compile your app to 
JavaScript and try again.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: My CellTable is slow and I don't know why

2010-11-04 Thread Owen Powell
It looks like the problem might only exist when you test locally. At
least for me, when I upload to AppEngine my table is as responsive as
the Showcase table.

~Owen

On 3 nov, 18:21, Owen Powell opow...@gmail.com wrote:
 I checked the CellTable style sheet, it looks fine. But the standard
 GWT stylesheet (the standard.css resource that gets loaded in my
 app) contains a dependant style selector table td.

 Could this be my problem? Can the standard style sheet somehow be
 modified?

 Best,

 ~Owen

 On 3 nov, 18:08, Owen Powell opow...@gmail.com wrote:







  Thanks John, the problem definitely seems to be descendant style
  selectors (since I see recurring Javascript calls in Speed Tracer).

  But I'm not sure why this is, since I don't have any styles defined in
  my app. Could it be that the default CellTable style file is creating
  this problem?

  ~Owen

  On 3 nov, 16:25, John LaBanca jlaba...@google.com wrote:

   Have you tried looking at it with SpeedTracer?  We tested with large 
   tables
   (100 rows), and the hover code is pretty straight forward.

   In past applications, we've seen performance problems when hovering due
   to descendant style selectors because of the way they are implemented in
   browser.

   For example, you have this CSS style defined:
   .myRandomWidget td {
     padding: 3px;

   }

   And you have a CellTable that is NOT myRandomWidget, then changing the 
   hover
   style of the row will cause some browsers to walk up from every TD in the
   CellTable trying to match the style definition.  In the degenerate case,
   where CellTable is not myRandomWidget, this means walking up to the body
   element.  This is a native browser implementation, and the only solution 
   is
   to avoid descendant style selectors.

   If this isn't the case, SpeedTracer should be able to help you narrow down
   the performance problem.

   Thanks,
   John LaBanca
   jlaba...@google.com

   On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell opow...@gmail.com wrote:
I've only tested it on the latest stable build of Chrome.

On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote:
 My CellTable is slow under Firefox 3.6 only.

 On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:

  Hi everyone,

  When I make a simple CellTable, the responsiveness of the table in 
  the
  browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
  fast as the table in the Showcase (http://gwt.google.com/samples/
  Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

  My code is below. Best,

  ~Owen

  // Data object class.

  package tabletest.client;

  import java.util.ArrayList;

  public class InterestingThing {

          public ArrayListString values = new ArrayListString();

          public InterestingThing(int n) {
                  for (int i=0; in; i++) {
                          values.add(Value  + i);
                  }
          }

  }

  // Custom CellTable class.

  package tabletest.client;

  import java.util.ArrayList;

  import com.google.gwt.user.cellview.client.CellTable;
  import com.google.gwt.user.cellview.client.TextColumn;

  public class MyCellTable extends CellTableInterestingThing {

          public MyCellTable() {
                  super();

                  int NUM_COLUMNS = 4;
                  int NUM_ROWS = 25;

                  // Create table.
                  for (int i=0; iNUM_COLUMNS; i++) {
                          addTextColumn(i);
                  }

                  // Create data.
                  ArrayListInterestingThing data = new
  ArrayListInterestingThing();
                  for (int i=0; iNUM_ROWS; i++) {
                          data.add(new InterestingThing(NUM_COLUMNS));
                  }

                  // Put data into table.
                  setRowData(0, data);
          }

          private void addTextColumn(final int i) {
                  TextColumnInterestingThing newColumn = new
  TextColumnInterestingThing() {

                          public String getValue(InterestingThing m) {
                                  return m.values.get(i);
                          }
                  };
                  addColumn(newColumn, Field  + i);
          }

  }

  // Entrypoint.

  package tabletest.client;

  import com.google.gwt.core.client.EntryPoint;
  import com.google.gwt.user.client.ui.RootPanel;

  public class TableTest implements EntryPoint {

          public void onModuleLoad() {

                  MyCellTable table = new MyCellTable();
                  RootPanel.get().add(table);
          }

  }

--
You received this message because you are subscribed to the Google 
Groups
Google Web Toolkit group.
To post to this 

My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
Hi everyone,

When I make a simple CellTable, the responsiveness of the table in the
browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
fast as the table in the Showcase (http://gwt.google.com/samples/
Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

My code is below. Best,

~Owen

// Data object class.

package tabletest.client;

import java.util.ArrayList;

public class InterestingThing {

public ArrayListString values = new ArrayListString();

public InterestingThing(int n) {
for (int i=0; in; i++) {
values.add(Value  + i);
}
}

}

// Custom CellTable class.

package tabletest.client;

import java.util.ArrayList;

import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.TextColumn;

public class MyCellTable extends CellTableInterestingThing {

public MyCellTable() {
super();

int NUM_COLUMNS = 4;
int NUM_ROWS = 25;

// Create table.
for (int i=0; iNUM_COLUMNS; i++) {
addTextColumn(i);
}

// Create data.
ArrayListInterestingThing data = new
ArrayListInterestingThing();
for (int i=0; iNUM_ROWS; i++) {
data.add(new InterestingThing(NUM_COLUMNS));
}

// Put data into table.
setRowData(0, data);
}

private void addTextColumn(final int i) {
TextColumnInterestingThing newColumn = new
TextColumnInterestingThing() {

public String getValue(InterestingThing m) {
return m.values.get(i);
}
};
addColumn(newColumn, Field  + i);
}

}

// Entrypoint.

package tabletest.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class TableTest implements EntryPoint {

public void onModuleLoad() {

MyCellTable table = new MyCellTable();
RootPanel.get().add(table);
}
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My CellTable is slow and I don't know why

2010-11-03 Thread Lukas Herman
My CellTable is slow under Firefox 3.6 only.

On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:
 Hi everyone,

 When I make a simple CellTable, the responsiveness of the table in the
 browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
 fast as the table in the Showcase (http://gwt.google.com/samples/
 Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

 My code is below. Best,

 ~Owen

 // Data object class.

 package tabletest.client;

 import java.util.ArrayList;

 public class InterestingThing {

         public ArrayListString values = new ArrayListString();

         public InterestingThing(int n) {
                 for (int i=0; in; i++) {
                         values.add(Value  + i);
                 }
         }

 }

 // Custom CellTable class.

 package tabletest.client;

 import java.util.ArrayList;

 import com.google.gwt.user.cellview.client.CellTable;
 import com.google.gwt.user.cellview.client.TextColumn;

 public class MyCellTable extends CellTableInterestingThing {

         public MyCellTable() {
                 super();

                 int NUM_COLUMNS = 4;
                 int NUM_ROWS = 25;

                 // Create table.
                 for (int i=0; iNUM_COLUMNS; i++) {
                         addTextColumn(i);
                 }

                 // Create data.
                 ArrayListInterestingThing data = new
 ArrayListInterestingThing();
                 for (int i=0; iNUM_ROWS; i++) {
                         data.add(new InterestingThing(NUM_COLUMNS));
                 }

                 // Put data into table.
                 setRowData(0, data);
         }

         private void addTextColumn(final int i) {
                 TextColumnInterestingThing newColumn = new
 TextColumnInterestingThing() {

                         public String getValue(InterestingThing m) {
                                 return m.values.get(i);
                         }
                 };
                 addColumn(newColumn, Field  + i);
         }

 }

 // Entrypoint.

 package tabletest.client;

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.ui.RootPanel;

 public class TableTest implements EntryPoint {

         public void onModuleLoad() {

                 MyCellTable table = new MyCellTable();
                 RootPanel.get().add(table);
         }







 }

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
I've only tested it on the latest stable build of Chrome.

On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote:
 My CellTable is slow under Firefox 3.6 only.

 On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:







  Hi everyone,

  When I make a simple CellTable, the responsiveness of the table in the
  browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
  fast as the table in the Showcase (http://gwt.google.com/samples/
  Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

  My code is below. Best,

  ~Owen

  // Data object class.

  package tabletest.client;

  import java.util.ArrayList;

  public class InterestingThing {

          public ArrayListString values = new ArrayListString();

          public InterestingThing(int n) {
                  for (int i=0; in; i++) {
                          values.add(Value  + i);
                  }
          }

  }

  // Custom CellTable class.

  package tabletest.client;

  import java.util.ArrayList;

  import com.google.gwt.user.cellview.client.CellTable;
  import com.google.gwt.user.cellview.client.TextColumn;

  public class MyCellTable extends CellTableInterestingThing {

          public MyCellTable() {
                  super();

                  int NUM_COLUMNS = 4;
                  int NUM_ROWS = 25;

                  // Create table.
                  for (int i=0; iNUM_COLUMNS; i++) {
                          addTextColumn(i);
                  }

                  // Create data.
                  ArrayListInterestingThing data = new
  ArrayListInterestingThing();
                  for (int i=0; iNUM_ROWS; i++) {
                          data.add(new InterestingThing(NUM_COLUMNS));
                  }

                  // Put data into table.
                  setRowData(0, data);
          }

          private void addTextColumn(final int i) {
                  TextColumnInterestingThing newColumn = new
  TextColumnInterestingThing() {

                          public String getValue(InterestingThing m) {
                                  return m.values.get(i);
                          }
                  };
                  addColumn(newColumn, Field  + i);
          }

  }

  // Entrypoint.

  package tabletest.client;

  import com.google.gwt.core.client.EntryPoint;
  import com.google.gwt.user.client.ui.RootPanel;

  public class TableTest implements EntryPoint {

          public void onModuleLoad() {

                  MyCellTable table = new MyCellTable();
                  RootPanel.get().add(table);
          }

  }

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My CellTable is slow and I don't know why

2010-11-03 Thread John LaBanca
Have you tried looking at it with SpeedTracer?  We tested with large tables
(100 rows), and the hover code is pretty straight forward.

In past applications, we've seen performance problems when hovering due
to descendant style selectors because of the way they are implemented in
browser.

For example, you have this CSS style defined:
.myRandomWidget td {
  padding: 3px;
}

And you have a CellTable that is NOT myRandomWidget, then changing the hover
style of the row will cause some browsers to walk up from every TD in the
CellTable trying to match the style definition.  In the degenerate case,
where CellTable is not myRandomWidget, this means walking up to the body
element.  This is a native browser implementation, and the only solution is
to avoid descendant style selectors.

If this isn't the case, SpeedTracer should be able to help you narrow down
the performance problem.

Thanks,
John LaBanca
jlaba...@google.com


On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell opow...@gmail.com wrote:

 I've only tested it on the latest stable build of Chrome.

 On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote:
  My CellTable is slow under Firefox 3.6 only.
 
  On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:
 
 
 
 
 
 
 
   Hi everyone,
 
   When I make a simple CellTable, the responsiveness of the table in the
   browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
   fast as the table in the Showcase (http://gwt.google.com/samples/
   Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
 
   My code is below. Best,
 
   ~Owen
 
   // Data object class.
 
   package tabletest.client;
 
   import java.util.ArrayList;
 
   public class InterestingThing {
 
   public ArrayListString values = new ArrayListString();
 
   public InterestingThing(int n) {
   for (int i=0; in; i++) {
   values.add(Value  + i);
   }
   }
 
   }
 
   // Custom CellTable class.
 
   package tabletest.client;
 
   import java.util.ArrayList;
 
   import com.google.gwt.user.cellview.client.CellTable;
   import com.google.gwt.user.cellview.client.TextColumn;
 
   public class MyCellTable extends CellTableInterestingThing {
 
   public MyCellTable() {
   super();
 
   int NUM_COLUMNS = 4;
   int NUM_ROWS = 25;
 
   // Create table.
   for (int i=0; iNUM_COLUMNS; i++) {
   addTextColumn(i);
   }
 
   // Create data.
   ArrayListInterestingThing data = new
   ArrayListInterestingThing();
   for (int i=0; iNUM_ROWS; i++) {
   data.add(new InterestingThing(NUM_COLUMNS));
   }
 
   // Put data into table.
   setRowData(0, data);
   }
 
   private void addTextColumn(final int i) {
   TextColumnInterestingThing newColumn = new
   TextColumnInterestingThing() {
 
   public String getValue(InterestingThing m) {
   return m.values.get(i);
   }
   };
   addColumn(newColumn, Field  + i);
   }
 
   }
 
   // Entrypoint.
 
   package tabletest.client;
 
   import com.google.gwt.core.client.EntryPoint;
   import com.google.gwt.user.client.ui.RootPanel;
 
   public class TableTest implements EntryPoint {
 
   public void onModuleLoad() {
 
   MyCellTable table = new MyCellTable();
   RootPanel.get().add(table);
   }
 
   }

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
Thanks John, the problem definitely seems to be descendant style
selectors (since I see recurring Javascript calls in Speed Tracer).

But I'm not sure why this is, since I don't have any styles defined in
my app. Could it be that the default CellTable style file is creating
this problem?

~Owen

On 3 nov, 16:25, John LaBanca jlaba...@google.com wrote:
 Have you tried looking at it with SpeedTracer?  We tested with large tables
 (100 rows), and the hover code is pretty straight forward.

 In past applications, we've seen performance problems when hovering due
 to descendant style selectors because of the way they are implemented in
 browser.

 For example, you have this CSS style defined:
 .myRandomWidget td {
   padding: 3px;

 }

 And you have a CellTable that is NOT myRandomWidget, then changing the hover
 style of the row will cause some browsers to walk up from every TD in the
 CellTable trying to match the style definition.  In the degenerate case,
 where CellTable is not myRandomWidget, this means walking up to the body
 element.  This is a native browser implementation, and the only solution is
 to avoid descendant style selectors.

 If this isn't the case, SpeedTracer should be able to help you narrow down
 the performance problem.

 Thanks,
 John LaBanca
 jlaba...@google.com







 On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell opow...@gmail.com wrote:
  I've only tested it on the latest stable build of Chrome.

  On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote:
   My CellTable is slow under Firefox 3.6 only.

   On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:

Hi everyone,

When I make a simple CellTable, the responsiveness of the table in the
browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
fast as the table in the Showcase (http://gwt.google.com/samples/
Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

My code is below. Best,

~Owen

// Data object class.

package tabletest.client;

import java.util.ArrayList;

public class InterestingThing {

        public ArrayListString values = new ArrayListString();

        public InterestingThing(int n) {
                for (int i=0; in; i++) {
                        values.add(Value  + i);
                }
        }

}

// Custom CellTable class.

package tabletest.client;

import java.util.ArrayList;

import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.TextColumn;

public class MyCellTable extends CellTableInterestingThing {

        public MyCellTable() {
                super();

                int NUM_COLUMNS = 4;
                int NUM_ROWS = 25;

                // Create table.
                for (int i=0; iNUM_COLUMNS; i++) {
                        addTextColumn(i);
                }

                // Create data.
                ArrayListInterestingThing data = new
ArrayListInterestingThing();
                for (int i=0; iNUM_ROWS; i++) {
                        data.add(new InterestingThing(NUM_COLUMNS));
                }

                // Put data into table.
                setRowData(0, data);
        }

        private void addTextColumn(final int i) {
                TextColumnInterestingThing newColumn = new
TextColumnInterestingThing() {

                        public String getValue(InterestingThing m) {
                                return m.values.get(i);
                        }
                };
                addColumn(newColumn, Field  + i);
        }

}

// Entrypoint.

package tabletest.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class TableTest implements EntryPoint {

        public void onModuleLoad() {

                MyCellTable table = new MyCellTable();
                RootPanel.get().add(table);
        }

}

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
I checked the CellTable style sheet, it looks fine. But the standard
GWT stylesheet (the standard.css resource that gets loaded in my
app) contains a dependant style selector table td.

Could this be my problem? Can the standard style sheet somehow be
modified?

Best,

~Owen

On 3 nov, 18:08, Owen Powell opow...@gmail.com wrote:
 Thanks John, the problem definitely seems to be descendant style
 selectors (since I see recurring Javascript calls in Speed Tracer).

 But I'm not sure why this is, since I don't have any styles defined in
 my app. Could it be that the default CellTable style file is creating
 this problem?

 ~Owen

 On 3 nov, 16:25, John LaBanca jlaba...@google.com wrote:







  Have you tried looking at it with SpeedTracer?  We tested with large tables
  (100 rows), and the hover code is pretty straight forward.

  In past applications, we've seen performance problems when hovering due
  to descendant style selectors because of the way they are implemented in
  browser.

  For example, you have this CSS style defined:
  .myRandomWidget td {
    padding: 3px;

  }

  And you have a CellTable that is NOT myRandomWidget, then changing the hover
  style of the row will cause some browsers to walk up from every TD in the
  CellTable trying to match the style definition.  In the degenerate case,
  where CellTable is not myRandomWidget, this means walking up to the body
  element.  This is a native browser implementation, and the only solution is
  to avoid descendant style selectors.

  If this isn't the case, SpeedTracer should be able to help you narrow down
  the performance problem.

  Thanks,
  John LaBanca
  jlaba...@google.com

  On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell opow...@gmail.com wrote:
   I've only tested it on the latest stable build of Chrome.

   On 3 nov, 14:28, Lukas Herman herni...@gmail.com wrote:
My CellTable is slow under Firefox 3.6 only.

On 3 lis, 14:07, Owen Powell opow...@gmail.com wrote:

 Hi everyone,

 When I make a simple CellTable, the responsiveness of the table in the
 browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
 fast as the table in the Showcase (http://gwt.google.com/samples/
 Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

 My code is below. Best,

 ~Owen

 // Data object class.

 package tabletest.client;

 import java.util.ArrayList;

 public class InterestingThing {

         public ArrayListString values = new ArrayListString();

         public InterestingThing(int n) {
                 for (int i=0; in; i++) {
                         values.add(Value  + i);
                 }
         }

 }

 // Custom CellTable class.

 package tabletest.client;

 import java.util.ArrayList;

 import com.google.gwt.user.cellview.client.CellTable;
 import com.google.gwt.user.cellview.client.TextColumn;

 public class MyCellTable extends CellTableInterestingThing {

         public MyCellTable() {
                 super();

                 int NUM_COLUMNS = 4;
                 int NUM_ROWS = 25;

                 // Create table.
                 for (int i=0; iNUM_COLUMNS; i++) {
                         addTextColumn(i);
                 }

                 // Create data.
                 ArrayListInterestingThing data = new
 ArrayListInterestingThing();
                 for (int i=0; iNUM_ROWS; i++) {
                         data.add(new InterestingThing(NUM_COLUMNS));
                 }

                 // Put data into table.
                 setRowData(0, data);
         }

         private void addTextColumn(final int i) {
                 TextColumnInterestingThing newColumn = new
 TextColumnInterestingThing() {

                         public String getValue(InterestingThing m) {
                                 return m.values.get(i);
                         }
                 };
                 addColumn(newColumn, Field  + i);
         }

 }

 // Entrypoint.

 package tabletest.client;

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.ui.RootPanel;

 public class TableTest implements EntryPoint {

         public void onModuleLoad() {

                 MyCellTable table = new MyCellTable();
                 RootPanel.get().add(table);
         }

 }

   --
   You received this message because you are subscribed to the Google Groups
   Google Web Toolkit group.
   To post to this group, send email to google-web-tool...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message