|
Performance Overview
Feature-rich web applications are not very useful if they cannot perform well. The demands of the Web are so great that code is expected to do more in less time than ever before. This section describes some key principles of Web application performance, tips for writing code that performs well, and tools for measuring performance. ASP.NET provides a number of built-in performance enhancements. For example, pages are compiled only once and cached for subsequent requests. Because these compiled pages are saved to disk, even a complete server restart does not invalidate them. ASP.NET also caches internal objects, such as server variables, to speed user code access. Further, ASP.NET benefits from all of the performance enhancements to the common language runtime: just-in-time compiling, a fine-tuned common language runtime for both single- and multiprocessor computers, and so on. However, all of these enhancements cannot protect you from writing code that does not perform well. Ultimately, you must ensure that your application can meet the demands of its users. The next section describes a few of the common ways to avoid performance bottlenecks. However, first you need to understand the following metrics:
Writing applications that perform well is all about striking a balance between these metrics. No single measurement can characterize how your application will behave under varying circumstances, but several measurements taken together can paint a reasonable picture of an application's performance.
|