.NET news » Performance Performance Rss Feed

download
Stream Pipeline
This month Stephen Toub explains how to make the most of dual processors when running encryption and compression tasks.
17 Dec 2007, 18:00:00   Source: Stream Pipeline   Tags: Performance
Squeezing more performance from SortedList
A SortedList implementations using a cyclic algorithm and C# IDictionary tweaks
20 Oct 2007, 16:28:00   Source: Squeezing more performance from SortedList   Tags: Performance
Caching Data with a Web Service in Enterprise Library

The Caching Application Block's provider mechanism lets you create a custom provider that stores cached data anywhere you want. It was this that made me wonder if it was possible to cache data within or through a web service, which would allow the provider to cache its data almost anywhere—remotely or locally—without having to write specific code that is directly integrated within Enterprise Library.

The principle is simple enough. Instead of having the backing store provider within the Caching Application Block interact directly with the backing store (the usual approach, as implemented in the Isolated Storage provider and Database provider), the backing store provider simply packages up the data and sends it to a web service..

Pooled Threads: Improve Scalability With New Thread Pool APIs
With the release of Windows Vista® and the upcoming release of Windows Server 2008, Microsoft has enriched the Windows platform with so much new technology for developers of managed applications that it's easy to overlook advancements that the native Windows developer can benefit from. The thread pool component that has been part of the platform since the release of Windows 2000, for example, has undergone a complete rearchitecture. The new implementation brings with it a new thread pool API that should make it much easier for developers to write correct code. The legacy APIs are still supported so that legacy applications can continue to run, but, as you'll see, there are many benefits to be gained from moving to the new APIs...
Optimize Managed Code For Multi-Core Machines

The Task Parallel Library (TPL) is designed to make it much easier to write managed code that can automatically use multiple processors. Using the library, you can conveniently express potential parallelism in existing sequential code, where the exposed parallel tasks will be run concurrently on all available processors. Usually this results in significant speedups.

TPL is being created as a collaborative effort by Microsoft Research, the Microsoft Common Language Runtime (CLR) team, and the Parallel Computing Platform team. TPL is a major component of the Parallel FX library, the next generation of concurrency support for the Microsoft .NET Framework...

21 Aug 2007, 19:00:00   Source: Optimize Managed Code For Multi-Core Machines   Tags: Performance
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