Slow program - InfoPath Dev
in

InfoPath Dev

Slow program

Last post 07-27-2007 04:51 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-26-2007 06:16 AM

    Slow program

    Hello,

     I m working on an InfoPath solution where I had to add and delete nodes using the managed code. However everytime I do this kind of operation, it takes a large amount of time (6 to 7 sec).

    For exemple, my program allows the user search a list of information by clicking on a button, this information is then displayed in a list box (a list of nodes generated by the managed code).

    My algorithm for the research:

    1: if nb of nodes >0 THEN remove all nodes

    2: if nb of nodes >1 THEN add N nb of nodes desired

    3: add N strings  in N nodes

    I would like to know whether there is a way to make it quicker?

    and if not Why is InfoPath so slow everytime we add or remove some nodes? (it is only XML and XSLT is n't it?)

    Thanks.

     .Net 1.1 InfoPath 2003 VS 2005 C#

  • 07-27-2007 04:51 AM In reply to

    Hi BanGotti,

    There are blogs and tutorials all over the Internet concerning this.  Just do a search for "InfoPath Performance" and you should find plenty of hints.  Here's some of mine:

    - Add calls to thisXDocument.View.DisableAutoUpdate() and thisXDocument.View.EnableAutoUpdate()

    - Switch views when doing a lot of heavy XML moving

    - Use a secondary DOM to do XML manipulation, then mirror into the Main DOM in one action

    The reason for the big perf hits is because InfoPath does a lot of schema validation on the Main DOM.  Moving to a secondary DOM curtails all of this validation and provides a huge perf boost.

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.