WorkflowGen.com | Knowledge Base | Documentation | Downloads | Support | RSS

« What permissions does WorkflowGen require on folders | Main | Security error when connecting to WorkflowGen »

Slow .NET applications

Posted on Sunday, August 19, 2007 at 08:56 by Registered CommenterWFG Team in | CommentsPost a Comment

Summary

On occasion .NET applications (such as the WorkflowGen web site or any applications created within WorkflowGen using .NET) may appear to slow down, sometimes for an extended period of time. This is caused by the .NET recompilation process under certain circumstances as described below.

Reproduction

This issue can be reproduced by doing a “cold boot” of the web server to simulate a “first load” scenario of the .NET applications.

  1. Reset IIS (using the iisreset command)
  2. Delete the files located in the directory:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

  1. Start/launch a .NET application (like WorkflowGen) and then launch a web form

The application is only rendered/displayed once all the files have been regenerated in the “Temporary ASP .NET Files” directory.

Isolation

Deleting the files in the “Temporary ASP .NET Files” directory forces the .NET Framework to recompile the web applications.

Once the applications are recompiled, the loading of web applications returns to normal (until the next time that they need to be recompiled). Recompiling the web applications may be long.

It has been noted that the time to recompile these files is longer than when an antivirus scanner scans/rescans the newly generated files in the “Temporary ASP .NET Files” directory, which also adds more time to the web application load times.

Solution(s)

The recompilation of the .NET applications will occur if the service is restarted, the application pool is recycled, the worker process is stopped or a modification is done to the application source files.

To identify the impact that the antivirus scan will have on the performance of the recompilation, you will need to follow the steps above to reproduce the issue after stopping the antivirus software. If the performance returns to normal, we can only recommend to contact the software vendor or to modify the scan properties to analyse the “Temporary ASP .NET Files” directory in a different manner (or not at all).

If the performance is not affected and is at an acceptable level, we suggest that the following steps be followed:

  1. By default, IIS will stop any worker process of an application pool after 20 minutes of inactivity. We suggest deactivating this option. Please refer to:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/83b35271-c93c-49f4-b923-7fdca6fae1cf.mspx?mfr=true

  1. By default, IIS will recycle the application pools every 1740 minutes. This option may also be deactivated. In this light, we would suggest creating an application pool dedicated for WorkflowGen. Please refer to:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/989a6b5c-289c-4a7c-95b5-175ee4c27159.mspx?mfr=true

  1. It is possible to force the .NET applications to recompile after they have been modified to avoid long wait times after a “cold boot”. To force the recompilation, you must execute the following lines using the aspnet_comiler.exe program.
    1. %windir%\Microsoft.NET\Framework\version\aspnet_compiler.exe -v "/wfgen" 1
    2. %windir%\Microsoft.NET\Framework\version\aspnet_compiler.exe -v "/wfgen/WfApps/WebApps/eFormASPX" 1
    3. %windir%\Microsoft.NET\Framework\version\aspnet_compiler.exe –v "/wfgen/WfApps/WebForms/MyWebForm" 1

    1 The virtual path is case sensitive

    Examples

    a. C:\windows\Microsoft.Net\Framework\v2.0.50727\aspnet_compiler.exe -v "/wfgen" 2

    b. C:\windows\Microsoft.Net\Framework\v2.0.50727\aspnet_compiler.exe -v "/wfgen/WfApps/WebApps/eFormASPX" 2

    c. C:\windows\Microsoft.Net\Framework\v2.0.50727\aspnet_compiler.exe -v "/wfgen/WfApps/WebForms/tracabilite_credits" 2

    2 The virtual path is case sensitive

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.