10 Replies Latest reply on Jul 10, 2008 5:17 AM by ilya_shaikovsky

    ModalPanel shown very slowly!!

    lmk

      Hi all,

      I get some performance problem with modalPanel; dont know id it's a common problem or it is related to my environement or my soure code..
      could please give us some hints show to show modalPanel quickly? there exist any recommendation for the best manner to show modalPanal and the content inside it ??

      the modalPanel below, takes ~10s befor appearing the first time and ~5s other times.
      why the first time is more slowly.wath's wrong on this cod?

      <f:subview xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
       <f:loadBundle basename="messages" var="msg" />
      
       <rich:modalPanel id="_panel" width="600" height="670"
       headerClass="tab_title" resizeable="true">
      
       <f:facet name="header">
       <h:outputText value="User details"></h:outputText>
       </f:facet>
       <f:facet name="controls">
       <h:graphicImage value="/images/close.png" style="cursor:pointer"
       onclick="Richfaces.hideModalPanel('_panel')" />
       </f:facet>
       <a4j:outputPanel id="panel_details_user" layout="block" style="overflow: scroll;">
       <h:form id="user_form">
       <h:panelGrid columns="2" align="center" id="details"
       columnClasses="modal_col1,modal_col2">
       <h:outputText value="#{msg.label_lastName}"></h:outputText>
       <h:outputText value="#{bean.lastName}" />
       <h:outputText value="#{msg.label_firstName}" />
       <h:outputText value="#{bean.firstName}" />
       <h:outputText value="#{msg.label_lastUpdate}" />
       <h:outputText value="#{bean.updateDate}">
       <f:convertDateTime pattern="MM/dd/yyyy" />
       </h:outputText>
       <h:outputText value="#{msg.label_email}" />
       <h:outputText value="#{bean.email}" />
       <h:outputText value="#{msg.label_company}" />
       <h:outputText value="#{bean.company}" />
      
       </h:panelGrid>
       </h:form>
       </a4j:outputPanel>
       </rich:modalPanel>
      </f:subview>
      
      


      thanks!!

        • 1. Re: ModalPanel shown very slowly!!
          lmk

          hello,

          no idea ?? it's impossible to use modalPanel if it take a lot of time to appear..
          the problem occurs after migration to the last 3.2.2 snapshot..
          event the content of the modalPanel is empty it takes more than 10s to be shown..

          here the code that call the modalPanel inside dataTable..

          <a4j:support event="onRowDblClick" reRender="details" action="#{queryBean.getSelected}" oncomplete="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})" />
          





          • 2. Re: ModalPanel shown very slowly!!
            ilya_shaikovsky

            Could you provide some example for compare? Feel free to create an issue. Then attach war and tell us for example that it will be one second under 3.x.x and 20-50 sec under 3.2.1. Then we will investigate this ASAP ;)

            • 3. Re: ModalPanel shown very slowly!!
              lmk

               

              "ilya_shaikovsky" wrote:
              Could you provide some example for compare? Feel free to create an issue. Then attach war and tell us for example that it will be one second under 3.x.x and 20-50 sec under 3.2.1. Then we will investigate this ASAP ;)


              thanks ilya;

              tested on 3.2.1 CR4 and 3.2.2 snapshot, it takes 14s for both..
              it is normal??
              modalPanel on demo site appear very quickly..but I use a4j:support inside dataTable and not simple link..



              • 4. Re: ModalPanel shown very slowly!!
                ilya_shaikovsky

                So, maybe most of the time lost while server interaction?

                • 5. Re: ModalPanel shown very slowly!!
                  lmk

                  I test on local machine..server interaction is faster for other requests, even display filter or sort a dataTable with 1000 rows..
                  test with no action.just

                  <a4j:support event="onRowDblClick" reRender="details" oncomplete="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})" />
                  


                  NB: use of myfaces 1.2.2 facelets 1.1.14.




                  • 6. Re: ModalPanel shown very slowly!!
                    mmichalek

                    We recently found a performance issue with ModalPanel that was caused by slow javascript - it's still unresolved for us. Maybe these are the same?

                    http://jira.jboss.com/jira/browse/RF-3670
                    http://jira.jboss.com/jira/browse/RF-3572

                    • 7. Re: ModalPanel shown very slowly!!
                      lmk

                       

                      "mmichalek" wrote:
                      We recently found a performance issue with ModalPanel that was caused by slow javascript - it's still unresolved for us. Maybe these are the same?

                      http://jira.jboss.com/jira/browse/RF-3670
                      http://jira.jboss.com/jira/browse/RF-3572


                      yes it seems similar, IE7 dont suggest to stop javascript execution, on FireFox it works better.



                      • 8. Re: ModalPanel shown very slowly!!
                        lmk

                        I can now specify the cases of the problem.

                        when i display all rows of dataTable more than 500 rows, modalPanel makes long time..

                        it works better if dataTable rows are not enormous.

                        regards!

                        • 9. Re: ModalPanel shown very slowly!!
                          mail.micke

                          Also having this problem; really slow on a page with a semi large table.

                          Would it be possible to add a property to the component telling it if it should disable the background elements or not.

                          Would be nice to just have it popup a dialog super quickly without having to worry about the background stuff (assuming this is what thakes time/cpu).

                          Cheers,
                          Micke

                          • 10. Re: ModalPanel shown very slowly!!
                            ilya_shaikovsky

                            lmk, try to add ajaxSingle=true to your support.