replaceChild method

E

ElVino

I use the replaceChild to update the XDocument with the results of a call to
a web service. It seems to take a very long time to execute (35 seconds). The
recordset is not that big (170 rows).
Is there anyway to improve the performance
 
S

Steve van Dongen [MSFT]

I use the replaceChild to update the XDocument with the results of a call to
a web service. It seems to take a very long time to execute (35 seconds). The
recordset is not that big (170 rows).
Is there anyway to improve the performance

Post your code

Regards,
Steve
 
E

ElVino

function NewStockOrderSetup()
{
var oXMLDoc;
var oNode;
var oRoot;
try
{
var vParams = new
Array(XDocument.DOM.selectSingleNode("/my:document_element/my:root/my:restaurant_id").text,0,defaultDOM.selectSingleNode("/my:root/my:stock_items").xml);
oXMLDoc = RunSecondaryDataSource("GetStockItems",vParams);
oRoot = XDocument.DOM.selectSingleNode("/my:document_element/my:root");
m_bEventsEnabled = false
oRoot.replaceChild(oXMLDoc.selectSingleNode("/dfs:myFields/dfs:dataFields/ns9:GetStockItemsResponse/ns9:GetStockItemsResult/my:stock_items"),oRoot.selectSingleNode("./my:stock_items"));
m_bEventsEnabled = true;
}
catch(err)
{
ThrowError(err,'NewStockSetup')
}
}
 
D

Dan The Man

Elvino,

Don't know if this might help, but my team ran into an infopath performance
issue that appears to be caused by Infopath redrawing itself each time you
append/replace child nodes in a DOM that is tied to a View. We got around
this issue by creating a new Node, appending all of our data to the new Node,
then adding/replacing the Node at the appropriate location.

Before we did this, it took 800 seconds to load 600 rows from our database
into a repeating table. Once we made the change, it took 20 seconds to load
the same number of rows into repeating table.

Will this help?

Dan
 
S

Steve van Dongen [MSFT]

Elvino,

Don't know if this might help, but my team ran into an infopath performance
issue that appears to be caused by Infopath redrawing itself each time you
append/replace child nodes in a DOM that is tied to a View. We got around
this issue by creating a new Node, appending all of our data to the new Node,
then adding/replacing the Node at the appropriate location.

Before we did this, it took 800 seconds to load 600 rows from our database
into a repeating table. Once we made the change, it took 20 seconds to load
the same number of rows into repeating table.

With respect to performance,
http://groups.google.com/[email protected]&rnum=1

Regards,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top