<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Improving performance of XML manipulation</title><link>https://www.infopathdev.com:443/forums/thread/79190.aspx</link><pubDate>Sat, 02 Jun 2012 16:15:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79190</guid><dc:creator>TerryB</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79190.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=79190</wfw:commentRss><description>I&amp;#39;m not sure if this will help, but have you checked out XDocument.View.DisableAutoUpdate() and XDocument.View.EnableAutoUpdate(). If you disable before you compose all your nodes etc. and the enable after this might improve performance.</description></item><item><title>Improving performance of XML manipulation</title><link>https://www.infopathdev.com:443/forums/thread/79189.aspx</link><pubDate>Sat, 02 Jun 2012 04:30:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79189</guid><dc:creator>trentos</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79189.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=79189</wfw:commentRss><description>I have an InfoPath form that pulls some records from a database and displays them on the form. This is all done in code behind. The way I populate the nodes is to use the .NET StringBuilder object to construct the XML string, which may contain 20 or so base nodes, and each of those containing their own elements/nodes. The entire tree averages a couple of hundred elements/nodes in total.&lt;br /&gt;&lt;br /&gt;

After building the string, I use XPATHNavigator.AppendChild() to insert the nodes into my form. Problem is InfoPath&amp;#39;s node parsing performance is terrible. A typical time taken for each part is around about:

&lt;p&gt;
- Connect to Database and retreive data set: 30ms&lt;br /&gt;
- Use StringBuilder to construct XML nodes: 0ms (Too fast to measure)&lt;br /&gt;
- Calling XPATHNavigator.AppendChild(): 4000ms&lt;br /&gt;
&lt;/p&gt;
Now it shouldn&amp;#39;t be taking this long, so I&amp;#39;m wondering if you guys know any techniques to create nodes in the form faster. I assumed that building the XML string manually and then calling AppendChild() only once would speed things up, but apparently it has not.</description></item></channel></rss>