ajax reRendering slow (page with big datatable)
gonzalad Oct 15, 2009 3:36 PMHello,
I'm using 3.3.2.SR1 (but same behaviour with 3.3.0.GA).
I have a page with 2 h:form :
- one for search criterias (I use rich:simpleTogglePanel here)
The simpleTogglePanel is in ajax mode.
- the other for a rich:dataTable (20 columns, 100 rows, and rendered on each column).
When I first expand the simpleTogglePanel (no rows displayed), the page is rendered in 200 ms.
I submit now the search (100 rows displayed)
Now, when I expand the simpleTogglePanel (with 100 rows displayed) it takes 5000 ms.
My simpleTogglePanel reRenders only itself.
What's my problem ?
Thank you very much for your help
P.S. also, this behaviour doesn't seem related to simpleTogglePanel only.
It appears on every ajax call.
A code extract from my page :
<h:form id="sF">
<rich:simpleTogglePanel id="mTp"
ajaxSingle="true"
switchType="ajax"
label="Â #{messages['recherche_avancee.tab.metier']}"
style="cursor:hand;"
opened="true"
immediate="true"
reRender="mTp">
Content
</rich:simpleTogglePanel>
</h:form>
<h:form id="dF">
<rich:dataTable
id="dDt"
value="#{action.dataModel}"
rows="#{action.pageSize}"
rowClasses="rich-table-cell-impair, rich-table-cell-pair"
var="element" width="800px">
<a4j:support event="onRowDblClick" rendered="#{permissionAction.hasPermission(element)}"
action="#{editerDocumentAction.setInstance(element)}"
immediate="true"
status="ajaxStatusMP" />
<rich:componentControl event="onRowContextMenu" for="menu" rendered="#{permissionAction.hasPermission(element)}"
operation="show">
<f:param name="id" value="#{element.id}"/>
</rich:componentControl>
<rich:column styleClass="rich-table-cell-checkbox">
<f:facet name="header">
<h:outputText id="sc" value="0" />
</f:facet>
<h:selectBooleanCheckbox value="#{action.selectedItems[element]}"
onclick="__colorTr(this, 'rich-table-row-over','ddF:dDt:sc','ddF:SearchInfoItemCheckedTop','ddF:SearchInfoItemCheckedBottom');"/>
</rich:column>
<rich:column
rendered="#{nomVisible}"
width="239px">
<f:facet name="header">
Sthing
</f:facet>
<a4j:outputPanel>
<rich:dragSupport dragType="doc" dragValue="#{element}" rendered="#{draggable}"/>
<h:outputText id="dti"
converter="gedtitleconverter" value="#{element.name}"/>
</a4j:outputPanel>
</rich:column>
<rich:column
rendered="#{auteurVisible}">
Same thing
</rich:column>
20 columns more...
<rich:dataTable>
</h:form>
Also here my measures for rich:simpleTogglePanel expand when the list is not loaded :
RESTORE_VIEW 1 view-id:/views/document/recherche_document.jspx 15 ms APPLY_REQUEST_VALUES 2 view-id:/views/document/recherche_document.jspx 0 ms RENDER_RESPONSE 6 view-id:/views/document/recherche_document.jspx 187 ms TOTAL_TIME view-id:/views/document/recherche_document.jspx 218 ms 0.190524 ms 1 AbstractRechercherDocumentAction.getActiviteProduits() 1.237793 ms 1 AbstractListAction.getDataModel() 0.290377 ms 1 AbstractRechercherDocumentAction.getEntites() 0.18874 ms 1 PermissionUtils.hasContributeurRole() 0.165715 ms 1 AbstractRechercherDocumentAction.getTypes() 0.16476 ms 1 AbstractListAction.isResultListNotEmpty() 0.164333 ms 1 SearchSimpleTogglePanelBean.setIdentitySimpleTogglePanel() 0.185757 ms 1 AbstractRechercherDocumentAction.getSources() 0.23012 ms 1 AbstractRechercherDocumentAction.getCurrentSousTypes() 0.326166 ms 2 ModalPanelAction.getModalPanelRendered() 0.172281 ms 1 AdvSearchSelectOneBindingBean.setMetierSelectOneMenu() 12.922218 ms 18 RechercherDocumentAction.getDocCriteria() 0.339619 ms 1 PermissionUtils.hasAdminRole() 0.162892 ms 1 AdvSearchSelectOneBindingBean.setSourceSelectOneMenu() 0.165822 ms 1 AbstractRechercherDocumentAction.getMetierIGs() 0.163427 ms 1 AdvSearchSelectOneBindingBean.setActiviteProduitSelectOneMenu() 0.173073 ms 1 AdvSearchSelectOneBindingBean.setEntiteSelectOneMenu() 0.174098 ms 1 AbstractRechercherDocumentAction.getLangues() 0.163303 ms 1 AdvSearchSelectOneBindingBean.setLangueSelectOneMenu()
And here with the list loaded (100 rows) :
RESTORE_VIEW 1 view-id:/views/document/recherche_document.jspx 16 ms APPLY_REQUEST_VALUES 2 view-id:/views/document/recherche_document.jspx 0 ms RENDER_RESPONSE 6 view-id:/views/document/recherche_document.jspx 4968 ms TOTAL_TIME view-id:/views/document/recherche_document.jspx 5000 ms 0.167171 ms 1 AbstractRechercherDocumentAction.getActiviteProduits() 1.588733 ms 2 AbstractListAction.getDataModel() 0.168221 ms 1 AbstractRechercherDocumentAction.getEntites() 102.631175 ms 504 PermissionUtils.hasPermission() 2.736667 ms 8 AbstractListAction.isPreviousExists() 0.303314 ms 1 PermissionUtils.hasContributeurRole() 0.16667 ms 1 AbstractRechercherDocumentAction.getTypes() 3.479147 ms 17 AbstractListAction.isResultListNotEmpty() 0.174401 ms 1 AbstractRechercherDocumentAction.getResultList() 0.23383 ms 1 SearchSimpleTogglePanelBean.setIdentitySimpleTogglePanel() 0.167281 ms 1 AbstractRechercherDocumentAction.getSources() 0.176942 ms 1 AbstractRechercherDocumentAction.getCurrentSousTypes() 1.36631 ms 6 ModalPanelAction.getModalPanelRendered() 0.406744 ms 1 AdvSearchSelectOneBindingBean.setMetierSelectOneMenu() 3.479231 ms 18 RechercherDocumentAction.getDocCriteria() 4.659462 ms 2 AbstractRechercherDocumentAction.getPageSize() 2.160107 ms 9 PermissionUtils.hasAdminRole() 0.308434 ms 1 AdvSearchSelectOneBindingBean.setSourceSelectOneMenu() 0.191742 ms 1 AbstractRechercherDocumentAction.getMetierIGs() 0.273503 ms 1 AdvSearchSelectOneBindingBean.setActiviteProduitSelectOneMenu() 0.404025 ms 2 PagedListAction.isNextExists() 0.244924 ms 1 AdvSearchSelectOneBindingBean.setEntiteSelectOneMenu() 0.167943 ms 1 AbstractRechercherDocumentAction.getLangues() 0.257387 ms 1 AdvSearchSelectOneBindingBean.setLangueSelectOneMenu()