6 Replies Latest reply on Apr 25, 2010 5:35 AM by cosmacr

    Performance issue: IE7

    vfarina

      Hello,

       

      I am dealing with performances issues on IE7.

      The page loading time is quite slow and not acceptable comparing with other browsers.

       

      We use:

       

      - JSF 1.2

      - RichFaces 3.3.0 ( I also tested the last released 3.3.3 CR1 but nothing changed).

      -- Customized JavaScript files from RichFaces (plugin used: maven-resource-dependency-plugin)

       

      - The table rendered contains a ColumnGroup with 7 columns by row.

      Each row contains:

      <h:selectBooleanCheckbox>

      <rich:dataList>

      <h:outputLink>

      <h:outputtext>

       

      Of course, if I delete some components on the table, the pagination is quite faster since less information is displayed.

       

      But...

      For instance, when we use the pagination through the rich:datascroller, on IE7 it takes like 1 second more than other browsers to display the next page. The ajax request is fired  but we noticed that the browser is like "blocked"  before displaying the next page. With other browsers, even IE6, this doesn't happen. I used a javascript debugger but i didn' t find anything "strange", the javascript functions seem to be ok and not "blocking" the browser.

       

      We know that IE7 is worse than other browser, but I would like to know if someone has the same problem.

       

      Thanks a lot,

       

      Veronica.

        • 1. Re: Performance issue: IE7
          nbelaevski

          Hi Veronica,

           

          1) Are there any particular components that cause slowdown?

          2) You can use a4j:log to track performance on the client

          1 of 1 people found this helpful
          • 2. Re: Performance issue: IE7
            vfarina

            Hi Nick,

             

            Firstly, thanks a lot for you reply.

            I have just put in place the <a4j:log>  and what  I noticed is:

             

            Part of the stack trace from the ajax debug on IE7:

            ...

            ...

            error[15:31:34,114]: Error to clear node  content by innerHTML Unknown runtime error
            debug[15:31:34,130]: search for  elements by name 'script'  in element input
            debug[15:31:34,130]: Scripts in  updated part count : 0
            debug[15:31:34,130]: Update part of  page for Id: GS_SearchResultBody:fr:deselectButton successful
            debug[15:31:34,130]: Update page part  from call parameter for ID GS_SearchResultBody:fr:numDocuments_header
            debug[15:31:34,145]: call  selectSingleNode for id= GS_SearchResultBody:fr:numDocuments_header
            debug[15:31:34,145]: Replace content  of node by outerHTML()
            debug[15:31:34,145]: search for  elements by name 'script'  in element span
            debug[15:31:34,145]: Scripts in  updated part count : 0
            debug[15:31:34,145]: Update part of  page for Id: GS_SearchResultBody:fr:numDocuments_header successful
            debug[15:31:34,145]: Update page part  from call parameter for ID GS_SearchResultBody:fr:ds1
            debug[15:31:34,145]: call  selectSingleNode for id= GS_SearchResultBody:fr:ds1
            debug[15:31:34,160]: Replace content  of node by outerHTML()
            debug[15:31:34,357]: search for  elements by name 'script'  in element div
            debug[15:31:34,357]: Scripts in  updated part count : 1
            debug[15:31:34,357]: Update part of  page for Id: GS_SearchResultBody:fr:ds1 successful
            debug[15:31:34,357]: Update page part  from call parameter for ID error[15:31:34,114]: Error to clear node  content by innerHTML Unknown runtime error
            debug[15:31:34,130]: search for  elements by name 'script'  in element input
            debug[15:31:34,130]: Scripts in  updated part count : 0
            debug[15:31:34,130]: Update part of  page for Id: GS_SearchResultBody:fr:deselectButton successful
            debug[15:31:34,130]: Update page part  from call parameter for ID GS_SearchResultBody:fr:numDocuments_header
            debug[15:31:34,145]: call  selectSingleNode for id= GS_SearchResultBody:fr:numDocuments_header
            debug[15:31:34,145]: Replace content  of node by outerHTML()
            debug[15:31:34,145]: search for  elements by name 'script'  in element span
            debug[15:31:34,145]: Scripts in  updated part count : 0
            debug[15:31:34,145]: Update part of  page for Id: GS_SearchResultBody:fr:numDocuments_header successful
            debug[15:31:34,145]: Update page part  from call parameter for ID GS_SearchResultBody:fr:ds1
            debug[15:31:34,145]: call  selectSingleNode for id= GS_SearchResultBody:fr:ds1
            debug[15:31:34,160]: Replace content  of node by outerHTML()
            debug[15:31:34,357]: search for  elements by name 'script'  in element div
            debug[15:31:34,357]: Scripts in  updated part count : 1
            debug[15:31:34,357]: Update part of  page for Id: GS_SearchResultBody:fr:ds1 successful
            debug[15:31:34,357]: Update page part  from call parameter for ID GS_SearchResultBody:fr:mt
            debug[15:31:34,357]: call  selectSingleNode for id= GS_SearchResultBody:fr:mt
            debug[15:31:34,418]: Replace content  of node by outerHTML()
            debug[15:31:38,397]: search for  elements by name 'script'  in element table
            debug[15:31:38,397]: Scripts in  updated part count : 0
            debug[15:31:38,397]: Update part of  page for Id: GS_SearchResultBody:fr:mt successful
            debug[15:31:34,357]: call  selectSingleNode for id= GS_SearchResultBody:fr:mt
            debug[15:31:34,418]: Replace content  of node by outerHTML()
            debug[15:31:38,397]: search for  elements by name 'script'  in element table
            debug[15:31:38,397]: Scripts in  updated part count : 0
            debug[15:31:38,397]: Update part of  page for Id: GS_SearchResultBody:fr:mt successful
            ...
            ...
            For information:
            GS_SearchResultBody:fr:mt is the <rich:datatable>
            GS_SearchResultBody:fr:ds1 is the <rich:datascroller>
            Between the blue lines there is almost 4 seconds!! What is going on?
            As you can see, I got an error in the first line that I don't have on FIREFOX.
            I also noticed that the Replace content of node by outerHTML()  is not called on FIREFOX.
            I will appreciate a lot if you have any idea of what is going on with the script executed on IE7!
            I will keep on analyzing to understand a little bit better how it works.
            Thanks a lot!

            • 3. Re: Performance issue: IE7
              vfarina

              Hi,

               

              The bottleneck seems to be on:

               

              oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);

               

              When the newnode is the table, the XMLSerializer takes like 2 seconds on IE7!!!

              The same execution on IE6 takes 200ms!!!!

               

              Any idea? Have you noticed the same problem on your IE7 browser?

               

              Thank you!

              • 4. Re: Performance issue: IE7
                nbelaevski

                Veronica,

                 

                Can you please post page code so that I'll try to reproduce the problem?

                One thing that can cause slowdowns is incorrect HTML code (e.g. DIV inside SPAN) - you can copy-paste logged XML code into w3c validator and check.

                1 of 1 people found this helpful
                • 5. Re: Performance issue: IE7
                  vfarina

                  Hello Nick,

                   

                  I attached the xhtml page & source code.

                  The w3c validator retrieves 100 errors...

                   

                  About the parser...Do you think that the NEKO filter could help?

                   

                   

                  Thanks a lot for your help.

                  • 6. Re: Performance issue: IE7

                    I have the same problem. The javascript from RichFaces is loaded very slow in IE7. Any news about this?

                     

                    Thank you!