.NET news » Performance Performance Rss Feed

Cache Up to the Caching Application Block in Enterprise Library 3.0

Any application you write may require some sort of caching to meet the performance requirements of the business. Until the release of Enterprise Library, developers were forced to roll out their own caching implementations; however, developers now finally have a standard out-of-the-box caching solution that is fully tested—and it's free! The Caching Application Block provides a flexible and extensible caching mechanism that can be used at any or all layers of an application. It supports in-memory, database, or isolated storage stores for persisting the cached data. It also includes a set of very easy-to-use APIs that let you incorporate standard caching operations into your applications without needing to learn the complexities of the caching implementation. This article introduces the Caching Application Block and shows examples of how to use it to write robust caching implementations.
15 Aug 2007, 17:25:50   Source: Cache Up to the Caching Application Block in Enterprise...   Tags: Performance

Boost ASP.NET Performance with Precompilation

The 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.
19 Apr 2007, 13:43:00   Source: Boost ASP.NET Performance with Precompilation   Tags: ASP.NET Performance

Speed Test: Switch vs If-Else-If

The .NET framework and the C# language provide two methods for conditional processing where multiple discrete values can be selected from. The switch statement is less flexible than the if-else-if ladder but is generally considered to be more efficient.
24 Mar 2007, 00:00:03   Source: Speed Test: Switch vs If-Else-If   Tags: Performance C#

Speed Testing and the Stopwatch Class

Software must operate at a speed that is acceptable to the end user. Often large improvements can be made by improving the speed of short-lived but heavily used routines. The speed of these can be accurately measured using the .NET 2.0 Stopwatch class.
20 Jan 2007, 05:40:26   Source: Speed Testing and the Stopwatch Class   Tags: Performance

Improving ASP.NET Application Performance and Scalability

Explore ways to reduce page load time, manage state efficiently, scale back on memory use, handle resources better, and improve data access in your ASP.NET applications.

Output Caching in ASP.NET 2.0

One of the most sure-fire ways to improve a web application's performance is to employ caching. Caching takes some expensive operation and stores its results in a quickly accessible location. ASP.NET version 1.0 introduced two flavors of caching:

  • Output Caching - caches the entire rendered markup of an ASP.NET web page or User Control for a specified duration.
  • Data Caching - a programmatically-accessible, in-memory data cache for storing objects in the web server's memory.

For a more in-depth discussion on ASP.NET 1.x's caching capabilities, refer to Scott McFarland's Caching with ASP.NET and Steve Smith's ASP.NET Caching: Techniques and Best Practices articles.

In ASP.NET 2.0, the caching system has been extended to include SQL cache dependencies, cache profiles, and post-cache substitution for output cached pages. The Caching for Performance section of the ASP.NET 2.0 QuickStarts provides a good overview of ASP.NET 2.0's caching options. This article explores output caching in ASP.NET 2.0, starting with an overview of output caching and followed by a detailed look at creating pages that include both cached and non-cached markup using fragment caching and post-cache substitution techniques.

12 Dec 2006, 18:00:00   Source: Output Caching in ASP.NET 2.0   Tags: ASP.NET Performance

Speed Optimization with page and server controls, web application settings and coding practices

ASP.NET Applications speed optimizations regarding to use of page and server controls, web application settings and best coding practices

Performance Console (PerfConsole)

The PerfConsole allows developers to analyze Visual Studio Performance Profiler's reports. It is a simple performance investigation tool which tries to adopt a debugger like experience to drilling into Visual Studio Performance Profiler generated data.
3 Aug 2006, 15:03:00   Source: Performance Console (PerfConsole)   Tags: Performance Software

System.Diagnostics.Stopwatch - always remember to use Reset

Wrong
        System.Diagnostics.Stopwatch s = new System.Diagnostics.Stopwatch();

        s.Start();
        for (i = 0; i < count; i++) Test1();
        s.Stop();
        Console.WriteLine("Test1: {0}", s.ElapsedMilliseconds);

        s.Start();
        for (i = 0; i < count; i++) Test2();
        s.Stop();

        Console.WriteLine("Test2: {0}", s.ElapsedMilliseconds);
Right
        System.Diagnostics.Stopwatch s = new System.Diagnostics.Stopwatch();

        s.Start();
        for (i = 0; i < count; i++) Test1();
        s.Stop();
        Console.WriteLine("Test1: {0}", s.ElapsedMilliseconds);

        s.Reset();

        s.Start();
        for (i = 0; i < count; i++) Test2();
        s.Stop();

        Console.WriteLine("Test2: {0}", s.ElapsedMilliseconds);
Not that *cough* I would ever make this mistake or anything, but you know... it could happen to like, a friend, or something. Ya. My friend. :)

.NET Offers a "First Chance" to Squelch Performance-killing Hidden Exceptions

Uncaught exceptions in your .NET applications can turn an otherwise high-performance application into a snail, especially those that are allowed to be "eaten" by subsequent code. Find out how to use very handy "First Chance" exception feature in the .NET debugger to root out nasty hidden exceptions.
3 May 2006, 18:04:18   Source: .NET Offers a "First Chance" to Squelch...   Tags: Performance