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 (http://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 http://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