Announcement

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

    slow rendering

    One of the forms in our application is pretty complex and has around 600 canvas (according to iscShowConsole). It takes 6 seconds to render on a pretty recent (1 year old) dual core laptop (in IE 8)

    We started digging, and we came up with a straightforward standalone sample, which is very simplistic test case. 600 input fields. Takes 6 seconds to render in IE8.

    This rendering time seems to grow non-linearly with increasing the number of form fields (4x more fields take 16x more time to render).

    We did some profiling with various tools (IE developer tools, dynatrace) and we think that bottleneck may be in the layout algorithm.

    I cannot attach my html because it is larger than attachment size allowed.

    Here's excerpt:

    Code:
    <!--===========================================================================
        SmartClient portal example -- portlet animation
            creates interactive portlet list, and drag-and-drop portlet content area
    ===========================================================================-->
    
    
    <!--===========================================================================
    // INITIALIZATION
    ===========================================================================-->
    
    <HTML><HEAD><TITLE>SmartClient portal animation example</TITLE>
        <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
        <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    	<SCRIPT SRC=isomorphic/skins/BlackOps/load_skin.js></SCRIPT>
    </HEAD><BODY CLASS="pageBackground">
    
    
    <SCRIPT>
    isc.ValuesManager.create({
            ID: "vm"        
    });
    
    isc.VLayout.create({
        width: 400,
        height: 300,
        membersMargin: 10,
        members : [
            isc.TabSet.create({
                    ID: "theTabs",
                height: 250,
                tabs: [
                    {title:"Item",
                        pane: isc.DynamicForm.create({
                            ID: "form0",
                            valuesManager:"vm",
                            fields: [
                                {name: "itemName", type:"text", title:"Item"},
                                {name: "description", type:"textArea", title:"Description"},
                                {name:"price", type:"float", title: "Price", defaultValue: "low"},
    <!-- 598 lines more exactly as above line...>
                                {name:"price", type:"float", title: "Price", defaultValue: "low"}
                            ]
                        })
                    },
                    {title:"Stock", 
                        pane: isc.DynamicForm.create({
                            ID: "form1",
                            valuesManager:"vm",
                            fields: [
                                {name: "inStock", type:"checkbox", title:"In Stock"},
                                {name: "nextShipment", type:"date", title:"Next Shipment",
                                    useTextField:"true", defaultValue:"256"
                                }                                
                            ]
                        })    
                    }
                ]
            }),
            isc.Button.create({
                title:"Submit",
                click : function () {
                    vm.validate();
                    if (form1.hasErrors()) theTabs.selectTab(1);
                    else theTabs.selectTab(0);
                }
            })    
        ]
    });
    
    
    </SCRIPT></BODY></HTML>

    #2
    600 input fields in one form on one screen isn't a usable interface, and if there's something slow in a form layout algorithm that involves 600 input fields, there's no indication that fixing that is going to have any impact at all on a screen that is actually composed of 600 Canvases and has no similarly large forms.

    Instead, focus on reducing unnecessary uses of components - such as single-member layouts or unnecessary nesting. If you find any evidence of code that could be faster and would actually impact a real-world use case, please let us know.

    Comment


      #3
      This is a requirement from one of our clients for "Advanced Users". Anything to optimize this would be welcomed - even if the initial load is slow but the next views after that is fast, then it would be acceptable.

      Comment


        #4
        600 input fields in a single form is the way the screen is actually constructed? And your "Advanced Users" actually want this - you've asked?

        Comment


          #5
          We do not directly communicate with the users - these are our clients' users. The client wants to provide a UI that the user can continually type in without having to press a button to change the form currently viewed. I do not know the exact details of the requirements as of yet but I can try and get that information for you.
          Last edited by acarur01; 30 Sep 2011, 05:59.

          Comment


            #6
            Just an update - this type of page was requested by the "Advanced Users".

            Comment


              #7
              Currently, our product updates any visibility, editability, and value changes for form items by ourselves. I was wondering, if instead of doing this, we could try and use the dynamic forms as a data bound component. My question, before toying with the idea, is would it increase performance at all? We current call setValue/getValue on our own when do we server requests.

              Comment


                #8
                What do you mean by "data bound" - supplying a DataSource? We can't really say if this would make a difference or not, it's not really a performance-related setting.

                As far as the use case, sorry, but we can't consider moderate slowness for a single 600 field form as a bug. There's just too many other ways to structure the UI, all of which seem more usable. But you could pursue as a consulting project if you determine that yes, the users really want it that way and nothing else is as good.

                Comment


                  #9
                  Standalone test case is on its way - but will need to be emailed is it is a big file.

                  Comment


                    #10
                    Just to update - I have sent the email with the standalone testcases

                    Also, we were curious about the eventproxy tag added to every DOM element created. What is the reason behind this?

                    Comment

                    Working...
                    X