5 Replies Latest reply on Feb 17, 2011 1:47 PM by Yashavanth Kuntavalli

    Tree Performance issue in IE7

    Yashavanth Kuntavalli Newbie

      Hi I am using RichFaces 3.3.3.Final version and JSF 1.2 in my project which runs on a Websphere Portal server 6.1.

      Everything works fine If I use browsers other than IE ( ie Fine with Chrome, Mozila ).

      but It takes more than  10 seconds to load the tree component in IE 7, IE 6 .


      Code :

      <a4j:region renderRegionOnly="true">

      <rich:tree style="width:500px;bgcolor:#CEE" switchType="client" ajaxKeys="#{null}"  reRender="RecTreeID" preserveDataInRequest="false"                preserveModel="none"  limitToList="true" id="TreeID" nodeSelectListener="#{RFTreeTest.nodeSelectListener}" ajaxSingle="true">


           <rich:recursiveTreeNodesAdaptor id="RecTreeID" roots="#{RFTreeTest.modelList}"  var="lstVar1"  nodes="#{lstVar1.childList}"            includedNode="true">

      <richh:treeNode ajaxSingle="true" id="TreeNodeID" reRender="TreeNodeID">

      <h:selectBooleanCheckbox id="chkScriptBox" value="#{lstVar1.selectedFlag}" onclick="nodeChecked(this);"  disabled="#{lstVar1.Id != 0}">


      <h:outputText id="TreeLinkTextID" value="#{lstVar1.name}"></h:outputText>








      I have observed that adding recursiveTreeNodesAdaptor causes this problem, but I need to have this as i need to traverse the tree recursively


      This is the statistics I got When I monitored the http request response for IE using fidler


      Request Count:           3

      Bytes Sent:           5,286          (headers:5047; body:239)

      Bytes Received: 582,210          (headers:1274; body:580936)





      Requests started at:          00:25:20.515

      Responses completed at:          00:25:28.234

      Aggregate Session time:          00:00:00.265

      Sequence (clock) time:          00:00:07.7187500





      HTTP/500:           1

      HTTP/404:           1

      HTTP/200:           1



      RESPONSE BYTES (by Content-Type)


            text/html:          580,827

            ~headers~:          1,274

      application/xml:          109


      Also Please Note that :


      There is nothing wong in server side code as it is taking less than a second to complete the request.

      And same set of data ( Total of 50 nodes maximum depth of the tree being 5 ) taking less than a second in Chrome.


      Answers and pointers to fix this issue is greatly appreciated.

      If it is an existing bug in RichFaces please point to the code, I can fix and commit the patch.


      Thanks in advance for help.




        • 1. Tree Performance issue in IE7
          Nick Belaevski Master



          Can you use ajax nodes switching? Also does the problem reproduce only in portlet environment or not?

          • 2. Tree Performance issue in IE7
            Yashavanth Kuntavalli Newbie

            Hi Nick,


            Thanks for your reply, I have tried all 3 options ie Client,Ajax and Server but I did not see any improvement in the performance.

            The problem is same even with normal web app.

            I have tried same application with same set of data in normal webapp which also took 10 seconds to load the tree.

            • 3. Tree Performance issue in IE7
              Nick Belaevski Master

              Please add a4j:log to the page, switch tree to use ajax and toggle some nodes. Then post logged output here.

              • 4. Re: Tree Performance issue in IE7
                Yashavanth Kuntavalli Newbie

                Hi Nick ajax submit and refresh does not work in portal IE ( It works fine in Chrome and Mozilla ) due to peculiar problem, I have posted this in my previsous posts, Please have a look at http://community.jboss.org/message/581321#581321


                This is Error in IE for Portal Webpage which uses Rich Tree and Ajax:


                debug[17:33:38,434]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click

                debug[17:33:38,465]: Query preparation for form 'viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm' requested

                debug[17:33:38,465]: Append hidden control viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm with value [viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm] and value attribute [viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm]

                debug[17:33:38,481]: Append hidden control viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:productTreeID:input with value [] and value attribute []

                debug[17:33:38,496]: Append hidden control viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:modalPanelIDOpenedState with value [] and value attribute []

                debug[17:33:38,512]: Append hidden control viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:modalPanelID2OpenedState with value [] and value attribute []

                debug[17:33:38,527]: Append hidden control javax.faces.ViewState with value [j_id2] and value attribute [j_id2]

                debug[17:33:38,543]: parameter ajaxSingle with value viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:productTreeID:productRecTreeID:0::productTreeNodeID

                debug[17:33:38,559]: parameter viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:productTreeID:productRecTreeID:0::productTreeNodeIDAjaxExpanded with value true

                debug[17:33:38,574]: parameter viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm:productTreeID:productRecTreeID:0::productTreeNodeIDNodeExpanded with value true

                debug[17:33:38,606]: Look up queue with default name

                debug[17:33:38,621]: NEW AJAX REQUEST !!! with form: viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_:RFTreeTestForm

                debug[17:33:38,637]: Start XmlHttpRequest

                debug[17:33:38,652]: Request state : 1

                debug[17:33:38,668]: QueryString: AJAXREQUEST=viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3Aj_id_jsp_239753000_5&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm=viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AproductTreeID%3Ainput=&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AmodalPanelIDOpenedState=&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AmodalPanelID2OpenedState=&javax.faces.ViewState=j_id2&ajaxSingle=viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AproductTreeID%3AproductRecTreeID%3A0%3A%3AproductTreeNodeID&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AproductTreeID%3AproductRecTreeID%3A0%3A%3AproductTreeNodeIDAjaxExpanded=true&viewns_7_9U5KGQSVS27QE0IEKIM9V300G7_%3ARFTreeTestForm%3AproductTreeID%3AproductRecTreeID%3A0%3A%3AproductTreeNodeIDNodeExpanded=true&

                debug[17:33:39,184]: Request state : 2

                debug[17:33:39,184]: Request state : 3

                debug[17:33:39,199]: Request state : 4

                debug[17:33:39,215]: Request end with state 4

                error[17:33:39,215]: Request error, status : 404 Not Found

                debug[17:33:39,215]: replace all page content with response

                debug[17:33:39,231]: setup custom document.open method

                debug[17:33:39,231]: call selectSingleNode for id= org.ajax4jsf.oncomplete

                debug[17:33:39,231]: Processing updates finished, no oncomplete function to call


                Message was edited by: Yashavanth Kuntavalli

                • 5. Re: Tree Performance issue in IE7
                  Yashavanth Kuntavalli Newbie

                  Hi Nick,


                  As I don't use ajaxSumit or any ajax feture of the tree, I don't see anything in <a4j:log/>


                  My tree looks like this :


                  <rich:tree style="width:500px;bgcolor:#CEE" switchType="client"

                                                                    preserveDataInRequest="false" preserveModel="none" id="TreeID" nodeSelectListener="#{RFTreeTest.nodeSelectListener}">


                                                                    <a4jRich:recursiveTreeNodesAdaptor  id="RecTreeID" recursionOrder="first"

                                                                              roots="#{RFTreeTest.modelList}" var="modelListVar"

                                                                              nodes="#{modelListVar.childList}"  includedNode="true">


                                                                              <a4jRich:treeNode id="TreeNodeID" reRender="TreeNodeID">

                                                                                        <h:selectBooleanCheckbox id="chkScriptBox" value="#{modelListVar.selectedFlag}" onclick="nodeChecked(this);">


                                                                                        <h:outputText id="TreeLinkTextID" value="#{modelListVar.name}"></h:outputText>







                  for just 50+ nodes it is taking 8 to 10 seconds !


                  Many Thanks for your help.