This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
Large complex forms with multiple views, states, events and actions can take a long time to initially load. To improve the performance of these complex forms, you can run a PowerShell script to perform the initial IIS caching of the form prior to the first time someone opens it, reducing the loading time and minimizing the potential effects of an IIS reset.
- Run this script to pre-cache forms. Typically, after an IISRESET or Reboot has occurred.
- Edit the $urls variable to include one or more URLs to your forms, and update the Start-Sleep milliseconds to match how long it takes your biggest form to cache.
To enable IIS caching of a form, follow these steps:
- Ensure that Internet Explorer is on the K2 Server as the script starts an instance of IE.
- Download the attached script.
- Edit the $urls variable, pointing it to the runtime URLs of the forms which you can see when looking at the properties of the form. Update the Start-Sleep milliseconds to match how long it takes your biggest form to cache.
- Run the PowerShell script.
- Optional: Create a warm-up script trigger when an IISRESET or server reboot occurs. For more information see Expanding warm up script trigger (Navigating the SharePoint Maze blog post)