共用方式為


Tips and Tricks for Tuning Forms Services Performance

Folks,

I'm hearing a lot of issues about people having trouble getting InfoPath 2007 forms published to Forms Services on MOSS 2007 to run well.   People complain that the rendering and roundtripping operations just take too darn long.   There is some guidance available on how to build performant forms for the Rich Client (https://msdn2.microsoft.com/en-us/library/bb380251.aspx), and some of the concepts there would most certainly apply to forms published via Forms Services.   However, here are few more tips and tricks garnered from the experts that should help you improve the performance of Forms Services in your environment.

  • Upgrade to IE7 on the desktop.   There are performance benefits to moving up to IE7.  In some cases the difference is 5x to 10x.
  • Make sure the IE cache is big enough so our necessary 250K of content and scripts - needed for the browser to render Forms Services forms - doesn't get pushed out the cache after an initial download.   Customers with extraordinarily low thresholds (like ~1MB) will have issues.   Disk is cheap, increase that value to something reasonable like 10% of disk.
  • A good perf trick is to populate dropdowns via an XML file (especially if they are somewhat static) that is made a part of the form XSN.   We can cache that on the server and get good load performance optimization.  You can always republish the solution when the data changes.
  • If you have to download data via a data connection for a dropdown list or calculation, try to dynamically build a filtered query (via code) so that you are as efficient as possible with what you are retrieving.
  • Try to minimize On_Load activities like queries unless absolutely necessary.
  • Conditional visibility logic has some known performance problems.  A hotfix is available https://support.microsoft.com/kb/937206, which is manifested in a modifed 250K initial download when accessing Forms Services the first time.  The performance issue is related to the IE Script Engine and occurs at the browser level, not server-side.
  • Instead of using conditional visibility logic, try implementing multiple views on a form.   Splitting complex views into more than 1 view provides noticeable performance improvements.
  • Rich Text controls are noticeably slower in IE vs. Firefox, because Rich Text editing in Forms Services is an IE-only feature.  Limiting the number of Rich Text controls shown in the same view can really help form performance.
  • Try to prevent unnecessary roundtripping between the form browser and the server.  There are several round trip switches available on controls.   See the Browser Forms Tab on a given control to expose finer-grained options over the behavior.  Note what the warning messages you receive say about the form's potential round trip behavior when admin deploying the form.  It will tell you when multiple server roundtrips will be likely to occur when using your form.
  • If you have to do roundtrips to the server, try to have them triggered by buttons, so that the users know they initiated the wait themselves.  This UI trick can tend to reduce user dissatisfaction with the form performance.
  • Try not to treat an InfoPath form as a full, rich VB application.   It's not designed to be performant in that use case.
  • The more declarative logic (heavy use of rules, etc.) and managed code you have in the form, the slower it will be.   Try and follow the KISS method if at all possible (Keep it Simple, Stupid). 
  • Consider breaking out the server role of Forms Services to another machine on the MOSS farm.  Services such as indexing and query serving, or high file I/O operations can really impact the ability of Forms Services to get a time slice and perform properly.  

Hope this was helpful!

Tim

Comments

  • Anonymous
    August 15, 2007
    Very useful indeed (your blog IS really a goldmine! ;o) as I have big performance issues at the moment. I've got too many Rich Text controls I suppose! On your first point: we cannot move to IE7 (another application wouldn't work) so are you aware of any patch for IE6 that would improve performance please? One your second point: what do you mean by increase the IE cache? Are you talking about the "Form Session State" settings in the "InfoPath Forms Services" settings in the MOSS central Admin site? If not can you please explain how to increase the IE cache. If so, can you advice on wether to use Session State Service or Form view and its associated values please? On your 6th point about the Hotfix, can you please give us a link or the Hotfix number? Thanks in advance for your precious help!

  • Anonymous
    August 27, 2007
    Tim, Can you provide a link to the conditional visibility hotfix for IE?

  • Anonymous
    October 15, 2007
    Recently I've been doing a lot with IFS. It seems like the ideal solution to create and present forms

  • Anonymous
    November 09, 2007
    I was on the team that reported the issue that resulted in http://support.microsoft.com/kb/937206 and that patch doubles/triples performance of browser based forms. But, there is a more recent version of core.js located in the SharePoint SP1 Beta.  It has one more change that is very important.   Now if MS could fix the easy to duplicate memory leak with Rich Text controls and SHDOCVW.DLL and MSHTML.DLL I'll be happy.  We have a form that increases the memory utilization of iexplorer.exe 35K every time we switch views, and closing the form doesn't release the memory.  After 30 clicks the brower will either hang, crash, take up 100% CPU, or if you're lucky will say Out of Memory.

  • Anonymous
    December 10, 2007
    Will browser caching affect the full IP Client?  I was under the impression that IE7 improved auotext and other features of the full client, as with the browser. True?  Please clarify.

  • Anonymous
    January 25, 2008
    The comment has been removed

  • Anonymous
    June 02, 2008
    A friend recently encountered a performance problem using Infopath forms published through Sharepoint

  • Anonymous
    June 30, 2008
    Part 6 – Addendum: Links to related performance resources Welcome to the sixth article in our series

  • Anonymous
    September 01, 2008
    These links are from the InfoPath Team Blog I think they are essentials http://blogs.msdn.com/infopath/archive/2008/06/30/designing-browser-enabled-forms-for-performance-in-infopath-forms-services-part-6.aspx

  • Anonymous
    February 23, 2011
    tim u write like a story, so for every tip  u need to give the example , then only the readers understand the Tip.

  • Anonymous
    February 23, 2011
    tim u write like a story, so for every tip  u need to give the example , then only the readers understand the Tip.