Scalabilty issues with infopath 2003 - InfoPath Dev
in

InfoPath Dev

Scalabilty issues with infopath 2003

Last post 03-17-2008 04:16 PM by Greg Collins. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-09-2008 09:25 AM

    Scalabilty issues with infopath 2003

    Hi there,

     i'm just wondering if anyone of you have had the same issues , maybe i'm pushing Infopath too much for the goal i'm trying to achieve.

     

    I'm using a complex Oracle secondary datasource to filter out list of people reporting up to VP's etc..

    This is done through webservices in Infopath. Nothing unusual there.

     

    When there's only like 100 people that the query returns, it all works smoothly.

    When there's 3000 people in the scope, it goes...o.... so.... slow.... when... filling.. up ... my .... tables.

     

    the entries from the secondary datasource are copied over into a repeating table in the main document and yes, there are some rules set on checkboxes and (if type of machine is 'this', then set age to 'that')

    I waited 5 and a half hours, yes, that's 330 minutes for the data to appear in my sheet. ( i programmed 2 fields to write down the start time, query the database and then write the stop time into another field)

    Now..when i go on the server i use to run the webservices and i do exactly the same query (corpid= 'this'  and region is 'EMEA'), i takes about 20 minutes to get me all data back in a xml listing.

    so 20 minutes to get the xml sheet... what is infopath then doing that it takes 310 minutes to fetch this data from the secondary datasource and past it in the primarily table. 

    20 minutes compared to 330 minutes..

     

    and when i then work on the data to tick boxes per row, it goes.. slow.. as well.

     

    I get the impression that for huge lists like mine, if i click on a checkbox in lets say row 106, it loops through all rows again to check if all the set rules and condtional formating still aplly.

    so for 100 entries you might hardly notice but i find it way too slow.

    as a comparison, i turned of a couple of rules for the tickboxes and it took 2 hrs less to write out the table (still 3 hrs 30 min)

     

    I'm using the cloneNode(true)  method for adding rows to the DOM repeating table.

     

    Why doesn't it just query and import the data and when that's done, then start looking at the rules it needs to apply?

    To me, everytime you add a row with the cloneNode , it will add it  and then check all rows again for the rules..

    so the process of adding 3000 rows becomes very very slow..

     

    anyone know if infopath 2007 better at this before i start it all over again?

    tnxs

    K 

     

     


     


     

    KriZ
  • 03-12-2008 10:15 AM In reply to

    Re: Scalabilty issues with infopath 2003

    InfoPath has many performance related issues, especially when you start talking about very large query results and large DOM transfers (most especially to the Main DOM).

    Every time you make a modification in the Main DOM, any associated rules and code will run. So for each cloned node you insert, your background logic runs.

    Views start slowing down once a certain threshold is reached in the number of controls added to the view. This slowdown is even more pronounced when you have a lot of drop-down list boxes in the view, and even more pronounced yet if each of those drop-downs contain a large number of choices.

    Limiting what is in your view, via some kind of paging (coded by you) is often a wise choice.

    You can do things to prevent your rules and code from running (if they don't need to) on each insert into the Main DOM. Start by setting some value (can be in a secondary DOM) to identify to your rules and code that you are doing something wherein you don't want them to process. The in your rules, set the first action to be condition only: meaning, set the condition to look for this value being set, and if so, the stop processing the remaining rules (that's a check box option at the bottom of the rule action). In the code, you check the same node value. If set, then return from the function without processing.

    Hopefully some of this is helpful to you.

  • 03-12-2008 11:23 AM In reply to

    Re: Scalabilty issues with infopath 2003

    You know what Greg,

    I just solved the issue the moment i got your mail coming in.

    Basically, i changed a couple of lines on the 'onclick' event i've associated with the various buttons on my sheet to fetch the data.

    And instead of waiting for 5 hours for the data to be uploaded, i waited..  6 minutes   to 2804 nodes from one table to the other..

     

    The trick..

    XDocument.View.DisableAutoUpdate()  on the first line of the procedure.

     I'm copying data from one table to the other and do set the right properties, no need thus for an refresh constantly.

    at the end of the procedure, i turn it back on.

     

    XDocument.View.EnableAutoUpdate()

     Ah, if only i knew before...

     

    where do you get the time and motivation to answer all these calls for help.. 'Chapeau', as they say in France.

     

    KriZ
  • 03-13-2008 09:44 AM In reply to

    Re: Scalabilty issues with infopath 2003

    Ah! I'm glad you caught that one. I had intended to mention it in my last posting but forgot to because I started getting into all those other things. Disable/EnableAutoUpdate are essential when copying data into the Main DOM. They can make all the difference in the world so far as performance. But they, as mentioned, are not the only issues. Definitely remember to use them though! I'm glad you found that and appologize for not putting that in my post.

    I am employed as an InfoPath developer. Answering forum posts does two main things for me: 1) It keeps my skills sharp , and 2) it opens my eyes to new issues/discoveries that I hadn't thought of yet.

  • 03-13-2008 12:56 PM In reply to

    Re: Scalabilty issues with infopath 2003

    No appologies needed Greg, i'm glad there are souls out there that do care about others' issues.

     

     Yes , the intake speed of  data from secondary dataresources into the main DOM is somehow confuscated, you can't see it untill the processing stops and the screen gets refreshed. i could only see it  goes kind of exponential up.

     However, writing the selections on the list back to a SQL database via a webservice, i could stand there and watch every of my + 2000 rows go by ..one by one..at about a speed of 1 per second.

    again.. until i put the  View.DisableAutoupdate()  in at the start of the code... then it flies again.

     
    Lessons learned and it will never be forgotten.
     


    KriZ
  • 03-17-2008 04:16 PM In reply to

    Re: Scalabilty issues with infopath 2003

    Definitely!

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.