How to Improve Performance by Enabling IIS Caching on Initial Load of a Form

  • 15 February 2022
  • 0 replies
  • 135 views

Badge +6
 

How to Improve Performance by Enabling IIS Caching on Initial Load of a Form

KB001759

DOWNLOADS Form Precache.zip (1 KB)

PRODUCT
K2 smartforms 4.6.11
BASED ON
K2 smartforms 4.6.11
LEGACY/ARCHIVED CONTENT
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.

 

Introduction

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.

Note: 
  1. Run this script to pre-cache forms. Typically, after an IISRESET or Reboot has occurred.
  2. 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:
 

  1. Ensure that Internet Explorer is on the K2 Server as the script starts an instance of IE.
  2. Download the attached script.
  3. 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.
  4. Run the PowerShell script.
  5. 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)

 


0 replies

Be the first to reply!

Reply