.NET news » Performance Performance Rss Feed

download

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

Make your web application run faster

It is easy to develop your own ASP.NET web application. But making it do some useful things for your users while keeping the design simple and elegant is not so easy. If you are lucky, your web application will be used by more than a handful of users, in that case, performance can become important. For some of the web applications I worked on, performance is vital: the company will lose money if users get frustrated with the slow response.

There are many factors that can result in bad performance, the number of users is just one of them. As a developer in a big corporation, you usually don't have a chance to mess with real production servers. However, I think it is very helpful for developers to take a look at the servers that are hosting their applications...

6 Aug 2007, 08:11:00   Source: Make your web application run faster   Tags: ASP.NET Performance

Dynamic... but fast

How to use the DynamicMethod and ILGenerator classes to create dynamic code at runtime that outperforms reflection.
12 Jul 2007, 10:45:00   Source: Dynamic... but fast   Tags: Performance

A threading framework to optimize interoperation between .NET and apartment threaded COM components

A generic solution and an accompanying threading framework to optimize calls between .NET and apartment threaded COM components

ImageTraverser

Microsoft's System.Drawing.Bitmap class is deceptively simple - just create a Bitmap from a file, then use the GetPixel() and SetPixel() methods to manipulate the image, right? Unfortunately, these two methods are terribly slow, so a lower-level traversal via pointers is necessary for decent performance.

However, there is a reason that the .NET language designers are steadily moving away from pointers - code that utilizes them is usually brittle and error-prone, even when run under the CLR. Therefore, to minimize and isolate the use of unsafe code in my projects, I have encapsulated the necessary unsafe pointer code in this class, plus I have added several handy methods for dealing with image pixels.

The end result is a robust class for traversing images (ie, retrieving and setting individual pixels) - hence the moniker ImageTraverser.

19 Apr 2007, 14:48:00   Source: ImageTraverser   Tags: Graphics 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

HyperDescriptor: Accelerated dynamic property access

.NET provides flexible data-binding and runtime property access, but by default this is via reflection an is known to be relatively slow. This article uses the power of Reflection.Emit to provide a pre-compiled (and much accelerated) implementation for reflection properties, and demonstrates the use of TypeDescriptionProvider to dynamically apply this implementation to types.

A lot of technical details are included, but this code is all provided in the source; as a consumer you have to do almost nothing. Really. You may wish to jump ahead to the usage scenarios, then dip back if you want to know what makes it all work.

18 Apr 2007, 13:07:00   Source: HyperDescriptor: Accelerated dynamic property access   Tags: C# Performance

9 Reusable Parallel Data Structures and Algorithms

This column is less about the mechanics of a common language runtime (CLR) feature and more about how to efficiently use what you’ve got at your disposal. Selecting the right data structures and algorithms is, of course, one of the most common yet important decisions a programmer must make. The wrong choice can make the difference between success and failure or, as is the case most of the time, good performance and, well, terrible performance. Given that parallel programming is often meant to improve performance and that it is generally more difficult than serial programming, the choices are even more fundamental to your success.

In this column, we'll take a look at nine reusable data structures and algorithms that are common to many parallel programs and that you should be able to adapt with ease to your own .NET software. Each example is accompanied by fully working, though not completely hardened, tested, and tuned, code. The list is by no means exhaustive, but it represents some of the more common patterns. As you'll notice, many of the examples build on each other.

10 Apr 2007, 19:00:00   Source: 9 Reusable Parallel Data Structures and Algorithms   Tags: 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#

Improve Debugging And Performance Tuning With ETW

Event Tracing for Windows (ETW) provides general-purpose, high-speed tracing of events raised by both user-mode applications and kernel-mode device drivers. Learn how ETW can improve your development and debugging work.
12 Mar 2007, 19:00:00   Source: Improve Debugging And Performance Tuning With ETW   Tags: Debug Performance