Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Initial Load Performance

    (This is SmartGWT 2.1)

    I am trying to re-do a legacy app in SmartGWT and keep the look and feel similar to the original to minimize adoption pain. The problem is a page that has 25 TabPanels with nine tabs each, and each tab has a TreeWidget in it. It takes a long time to load in IE 7.0 and gives the "Stop Running This Script?" prompt several times. This isn't a server issue because this demo uses canned client side data. Once the initial front page is up, it takes about nine seconds to switch to the page with the 25 TabPanels.

    Any ideas on how to speed up the load and rendering on IE? It seems to be ok (if a little slow) in Chrome and Firefox, but we have to suport IE. Here is a code snippet showing one of the TabPanels and one of the Tree data sources. (They are all very similar.) In the actual app the tree widget is built with data from the server.

    Code:
          Tree t1a = new Tree();
          TreeNode t1aroot = new TreeNode("Root");
          t1a.setRoot(t1aroot);
          TreeNode t1ab1 = new TreeNode("Branch 1");
          TreeNode t1ab2 = new TreeNode("Branch 2");
          TreeNode t1ab3 = new TreeNode("Branch 3");
          TreeNode t1ab4 = new TreeNode("Branch 4");
          t1a.add(t1ab1,t1aroot);
          t1a.add(t1ab2,t1aroot);
          t1a.add(t1ab3,t1aroot);
          t1a.add(t1ab4,t1aroot);
          TreeNode t1ab1l1 = new TreeNode("Leaf 1.1");
          TreeNode t1ab1l2 = new TreeNode("Leaf 1.2");
          t1a.add(t1ab1l1,t1ab1);
          t1a.add(t1ab1l2,t1ab1);
    
    
          TabSet ts8 = new TabSet();
          ts8.setExtraSpace(5); 
          ts8.setTabBarPosition(Side.TOP);   
          ts8.setWidth(800);   
          ts8.setHeight(220);   
    
          Tab tt8a = new Tab("T8a");
          TreeGrid tg8a = new TreeGrid();
          tg8a.setData(t1a);
          tg8a.setShowConnectors(new Boolean(true));
          tt8a.setPane(tg8a);
          ts8.addTab(tt8a);
    
          Tab tt8b = new Tab("T8b");
          TreeGrid tg8b = new TreeGrid();
          tg8b.setData(t1b);
          tg8b.setShowConnectors(new Boolean(true));
          tt8b.setPane(tg8b);
          ts8.addTab(tt8b);
    
          Tab tt8c = new Tab("T8c");
          TreeGrid tg8c = new TreeGrid();
          tg8c.setData(t1a);
          tg8c.setShowConnectors(new Boolean(true));
          tt8c.setPane(tg8c);
          ts8.addTab(tt8c);
    
          Tab tt8d = new Tab("T8d");
          TreeGrid tg8d = new TreeGrid();
          tg8d.setData(t1a);
          tg8d.setShowConnectors(new Boolean(true));
          tt8d.setPane(tg8d);
          ts8.addTab(tt8d);
    
          Tab tt8e = new Tab("T8e");
          TreeGrid tg8e = new TreeGrid();
          tg8e.setData(t1a);
          tg8e.setShowConnectors(new Boolean(true));
          tt8e.setPane(tg8e);
          ts8.addTab(tt8e);
    
          Tab tt8f = new Tab("T8f");
          TreeGrid tg8f = new TreeGrid();
          tg8f.setData(t1a);
          tg8f.setShowConnectors(new Boolean(true));
          tt8f.setPane(tg8f);
          ts8.addTab(tt8f);
    
          Tab tt8g = new Tab("T8g");
          TreeGrid tg8g = new TreeGrid();
          tg8g.setData(t1a);
          tg8g.setShowConnectors(new Boolean(true));
          tt8g.setPane(tg8g);
          ts8.addTab(tt8g);
    
          Tab tt8h = new Tab("T8h");
          TreeGrid tg8h = new TreeGrid();
          tg8h.setData(t1a);
          tg8h.setShowConnectors(new Boolean(true));
          tt8h.setPane(tg8h);
          ts8.addTab(tt8h);
    
          Tab tt8i = new Tab("T8i");
          TreeGrid tg8i = new TreeGrid();
          tg8i.setData(t1a);
          tg8i.setShowConnectors(new Boolean(true));
          tt8i.setPane(tg8i);
          ts8.addTab(tt8i);
    
          vx.addMember(ts8);

    #2
    well the debug server mode have some speed issue.. soo compile your proyect and test (NO DEBUG MODE) , too see what happend..

    for example, i cant load 10.000 records in debug mode because get freeze but in normal mode, is very fast

    Comment


      #3
      Actually, this happens when it is deployed as a Tomcat war and being served off of a Unix box. (All the testing is done this way so that we don't get as many surprises when we stand it up in production.)

      Comment


        #4
        Postpone creating a tab pane until the tab is activated.

        Comment

        Working...
        X