0 Replies Latest reply on Aug 27, 2007 9:52 AM by mail

    Ajax4jsf performance issue

    mail

      Hi.
      I have a page with large data on it (created by t:dataList), around 2000 rows.

      On click of a partcular column/row, I submit an Ajax request, which on being finished should open a modal box.
      All this works fine. Except that it takes a lot of time. I opened the Ajax debug window and found out that a lot of time is being spent in updating script, link. Why are these updated at all?

      Thanks in advance.

      Here is the ajax log.

      debug[15:45:08,434]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
      debug[15:45:08,465]: NEW AJAX REQUEST !!! with form :staticDataForm
      debug[15:45:08,497]: Append select-one control staticDataHeaderDropdown with value [AGRTYPE] and value attribute [AGRTYPE]
      debug[15:45:08,512]: Append hidden control columnIdBeingUpdated with value [19] and value attribute [19]
      debug[15:45:08,543]: Append hidden control pkIdBeingUpdated with value [1] and value attribute [1]
      debug[15:45:08,559]: Append hidden control value with value [] and value attribute []
      debug[15:45:08,590]: Append hidden control staticDataForm_SUBMIT with value [1] and value attribute [1]
      debug[15:45:08,622]: Append hidden control staticDataForm:_idcl with value [] and value attribute []
      debug[15:45:08,653]: Append hidden control staticDataForm:_link_hidden_ with value [] and value attribute []
      debug[15:45:08,668]: Append hidden control javax.faces.ViewState with value [rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE2cHQAFS9qc3Avc3RhdGljRGF0YS54aHRtbA==] and value attribute [rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE2cHQAFS9qc3Avc3RhdGljRGF0YS54aHRtbA==]
      debug[15:45:08,715]: parameter staticDataForm:staticdataActionButton2 with value staticDataForm:staticdataActionButton2
      debug[15:45:09,012]: Start XmlHttpRequest
      debug[15:45:09,043]: Reqest state : 1
      debug[15:45:09,075]: QueryString: AJAXREQUEST=_viewRoot&staticDataHeaderDropdown=AGRTYPE&columnIdBeingUpdated=19&pkIdBeingUpdated=1&value=&staticDataForm_SUBMIT=1&staticDataForm%3A_idcl=&staticDataForm%3A_link_hidden_=&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE2cHQAFS9qc3Avc3RhdGljRGF0YS54aHRtbA%3D%3D&staticDataForm%3AstaticdataActionButton2=staticDataForm%3AstaticdataActionButton2&
      debug[15:45:09,122]: Reqest state : 1
      debug[15:45:17,122]: Reqest state : 2
      debug[15:45:17,137]: Reqest state : 3
      debug[15:45:17,169]: Reqest state : 4
      debug[15:45:17,184]: Reqest end with state 4
      debug[15:45:17,215]: Response with content-type: text/xml;charset=UTF-8
      debug[15:45:17,278]: Full response content: <?xml version="1.0"?>








      Amend AGR FAMILY<a href="javascript:Richfaces.hideModalPanel('staticDataModalBox1')">XSelect new value:Swap + FXRepo1LendingFXOtherAll ProductsAgency Lending AgtExchange-relatedUpdate//<![CDATA[
      new ModalPanel('staticDataModalBox1', {
      width: 450,
      height: 300,
      minWidth: 450,
      minHeight: 200,
      resizeable: true,
      moveable: true,
      left: "auto",
      top: "auto",

      zindex: 2000
      });////]]>
      <!-- MYFACES JAVASCRIPT -->

      debug[15:45:17,372]: Update page by list of rendered areas from response staticDataModalBox1,staticDataForm:_id36,_id26
      debug[15:45:17,387]: search for elements by name 'script' in element #document
      debug[15:45:17,419]: selectNodes found 9
      debug[15:45:17,481]: in response with src=/mae2/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.jsf
      debug[15:45:17,512]: Such element exist in document
      debug[15:45:17,528]: in response with src=/mae2/a4j.res/org.ajax4jsf.framework.resource.PrototypeScript.jsf
      debug[15:45:17,575]: Such element exist in document
      debug[15:45:17,591]: in response with src=/mae2/a4j.res//org/richfaces/renderkit/html/scripts/utils.js.jsf
      debug[15:45:17,622]: Such element exist in document
      debug[15:45:17,653]: in response with src=/mae2/a4j.res//org/richfaces/renderkit/html/scripts/modalPanel.js.jsf
      debug[15:45:17,684]: Such element exist in document
      debug[15:45:17,747]: in response with src=/mae2/a4j.res//org/richfaces/renderkit/html/scripts/modalPanelBorders.js.jsf
      debug[15:45:17,778]: Such element exist in document
      debug[15:45:17,794]: in response with src=/mae2/a4j.res//org/richfaces/renderkit/html/scripts/browser_info.js.jsf
      debug[15:45:17,841]: Such element exist in document
      debug[15:45:17,872]: in response with src=/mae2/a4j.res/org.ajax4jsf.framework.util.command.CommandScript.jsf
      debug[15:45:17,887]: Such element exist in document
      debug[15:45:17,934]: in response with src=/mae2/a4j.res/scripts/menu.js.jsf
      debug[15:45:17,981]: Such element exist in document
      debug[15:45:18,012]: search for elements by name 'link' in element #document
      debug[15:45:18,137]: selectNodes found 4
      debug[15:45:18,216]: in response with src=/mae2/a4j.res//org/richfaces/renderkit/html/css/modalPanel.xcss/DATA/eAGz-yBjAQAEPAGD.jsf
      debug[15:45:18,247]: Such element exist in document
      debug[15:45:18,278]: in response with src=/mae2/a4j.res/css/toolBar.xcss/DATA/eAGz-yBjAQAEPAGD.jsf
      debug[15:45:18,309]: Such element exist in document
      debug[15:45:18,419]: in response with src=/mae2/a4j.res/css/menucomponents.xcss/DATA/eAGz-yBjAQAEPAGD.jsf
      debug[15:45:18,466]: Such element exist in document
      debug[15:45:18,512]: in response with src=/mae2/a4j.res/css/dropdownmenu.xcss/DATA/eAGz-yBjAQAEPAGD.jsf
      debug[15:45:18,528]: Such element exist in document
      debug[15:45:18,575]: Attempt to update part of page for Id: staticDataModalBox1
      debug[15:45:18,606]: call selectSingleNode for id= staticDataModalBox1
      debug[15:45:18,653]: Replace content of node by outerHTML()
      debug[15:45:18,669]: search for elements by name 'script' in element div
      debug[15:45:18,997]: selectNodes found 1
      debug[15:45:19,012]: Scripts in updated part count : 1
      debug[15:45:19,044]: Update part of page for Id: staticDataModalBox1 successful
      debug[15:45:19,091]: Attempt to update part of page for Id: staticDataForm:_id36
      debug[15:45:19,106]: call selectSingleNode for id= staticDataForm:_id36
      debug[15:45:19,153]: Replace content of node by outerHTML()
      debug[15:45:19,169]: search for elements by name 'script' in element div
      debug[15:45:19,184]: selectNodes found 0
      debug[15:45:19,216]: Scripts in updated part count : 0
      debug[15:45:19,231]: Update part of page for Id: staticDataForm:_id36 successful
      debug[15:45:19,262]: Attempt to update part of page for Id: _id26
      debug[15:45:19,278]: call selectSingleNode for id= _id26
      debug[15:45:19,309]: Replace content of node by outerHTML()
      debug[15:45:19,325]: search for elements by name 'script' in element div
      debug[15:45:19,372]: selectNodes found 0
      debug[15:45:19,403]: Scripts in updated part count : 0
      debug[15:45:19,450]: Update part of page for Id: _id26 successful
      debug[15:45:19,466]: call selectSingleNode for id= ajax-update-ids
      debug[15:45:19,497]: Hidden JSF state fields:
      debug[15:45:19,512]: Namespace for hidden view-state input fields is undefined
      debug[15:45:19,544]: search for elements by name 'input' in element span
      debug[15:45:19,575]: selectNodes found 2
      debug[15:45:19,606]: Replace value for inputs: 1824 by new values: 2
      debug[15:45:19,637]: Input in response: jsf_sequence
      debug[15:45:26,216]: Input in response: javax.faces.ViewState
      debug[15:45:26,263]: Found same input on page with type: hidden
      debug[15:45:26,325]: Found same input on page with type: hidden
      debug[15:45:26,403]: Found same input on page with type: hidden
      debug[15:45:26,450]: Found same input on page with type: hidden
      debug[15:45:26,481]: Found same input on page with type: hidden
      debug[15:45:26,544]: Found same input on page with type: hidden
      debug[15:45:32,075]: Found same input on page with type: hidden
      debug[15:45:32,122]: search for elements by name 'INPUT' in element span
      debug[15:45:32,153]: selectNodes found 0
      debug[15:45:32,185]: Replace value for inputs: 1824 by new values: 0
      debug[15:45:32,200]: call selectSingleNode for id= _ajax:data
      debug[15:45:32,247]: call selectSingleNode for id= _ajax:data
      debug[15:45:32,388]: call selectSingleNode for id= _ajax:data
      debug[15:45:32,482]: call selectSingleNode for id= _ajax:data
      debug[15:45:32,575]: call selectSingleNode for id= _ajax:data
      debug[15:45:32,716]: call selectSingleNode for id= _A4J.AJAX.focus
      debug[15:45:32,778]: Call request oncomplete function after processing updates
      debug[15:45:32,950]: Evaluate script replaced area in document: //
      new ModalPanel('staticDataModalBox1', {
      width: 450,
      height: 300,
      minWidth: 450,
      minHeight: 200,
      resizeable: true,
      moveable: true,
      left: "auto",
      top: "auto",

      zindex: 2000
      });////
      debug[15:45:33,232]: call selectSingleNode for id= _ajax:data