advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
Rate this item | 0 users have rated this item.
 Print Print
 
Boost ASP.NET Performance with Precompilation
Use ASP.NET Whidbey's precompilation feature to minimize the initial load time of your ASP.NET web pages, and avoid having to deploy your source code to the server. 

advertisement
he latest version of ASP.NET, version 2.0, supports several new and exciting features that promise to enhance developer productivity, administration and management, extensibility, and performance. One of these features is precompilation, which either developers or administrators can use to precompile ASP.NET applications before they are deployed. Moreover, the new precompilation feature can detect and provide warnings about any compilation failure issues, and lets you deploy applications without the need to store the source code on the deployment server. Precompilation can both reduce application response time and improve performance. This article explains how to use the new feature effectively.

Why Precompilation?
Dynamic compilation model of ASP.NET Whidbey refers to the ability of ASP.NET to compile the application's code dynamically at runtime. Because the ASP.NET framework senses changes to source pages, this capability means you can change your web page, and then reload it using the same request from a browser to see the page changes without having to recompile your entire web site. That's a great feature during development, but not necessarily after deployment, where you're less likely to be changing pages constantly. Using the default model, though, ASP.NET still compiles pages the first time they get requested, even on the deployment server, and even if the pages haven't changed since the last time that application was loaded. But what if you could precompile your entire web site before deployment? This is where ASP.NET 2.0's precompilation feature fits in.

 
Figure 1. Aspnet_compiler Syntax: You can see a list of aspnet_compiler.exe options by adding the "/?" option to the command line.
Precompilation in ASP.NET Whidbey is available in two modes.

  • In-place precompilation
  • Precompilation for deployment
In Place Precompilation
This option enables you to precompile your entire project. In essence, it compiles each and every page of your application and displays any compilation errors that occur. The tool you use to precompile applications is called aspnet_compiler and it resides in the %WINDIR%\Microsoft.NET\Framework\v2.x.xxxx directory. Figure 1 displays help on all the available options of this tool when invoked with the "/?" parameter from the command line.

While Figure 1 lists many options, the basic syntax for using this tool is as follows.

   aspnet_compiler -v / -p  
For example, you would use the following statement at the command line to precompile a "TestWebSite" virtual directory using the aspnet_compiler precompilation tool.

   aspnet_compiler -v /TestWebSite
 
Figure 2. Temporary ASP.NET Files: By default, precompiled libraries get stored in the "Temporary ASP.NET Files" folder.
Note that the "-v" option shown above specifies a virtual directory. By default, the precompiled library created above gets stored in the Temporary ASP.NET Files directory as shown in Figure 2.

  Next Page: Precompilation for Deployment
Page 1: IntroductionPage 2: Precompilation for Deployment
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES