InProc Cache or Session Are Bad for Your Health

April 22, 2008

I've been doing a lot of performance tuning for our application lately, and the headline above is my number one tip for you. Unless you're writing a tiny application that will never ever have to scale, relying on the default ASP.NET Cache and Session modes - in process mode, that is - is a very bad idea. If you use in-process memory, you will get stuck without the ability to scale, that is move to a web-garden (more than one worker process on the same server) or a web-farm (more than one server serving requests for your app)....
one comment

What Every .NET Developer Should Know To Do With Sos.dll

April 20, 2008

This week had been a debugging week. Up until now my only debugging tool had been Visual Studio, but in some cases it just isn't enough. For instance, suppose you've noticed that your web application in production or in development  is currently utilizing a suspicious amount of memory. You want to know exactly what's taking up all this memory. Visual Studio does not normally allow you to find out, and so comes in sos.dll, which is a debugging extension for managed code. You can use sos.dll with windbg or from within Visual Studio. If this is production code...
no comments

Gimme Those VB9 XML Features

April 10, 2008

I've been to Tech-Ed Israel in Eilat this week and it was awesome. Tons of interesting lectures, food, parties and smart people to talk with. The first lecture I attended was "A Lap Around Visual Studio 2008 IDE and VB 9.0" by Lisa Feigenbaum of Microsoft. Now, I'm not much of a Visual Basic user (in fact, I rather dislike the syntax) but I've heard of some new support of VB for XML and I wanted to hear what it was about. Lisa started by showing some of the great Visual Studio support for Visual Basic...
one comment

Why Too Many Overloads Can Be a Bad Thing

April 1, 2008

At work we're using code generation to create our data access layer. So for the users table we have a UsersDalBase with many overloads of methods such as Add(User) and Add(IList<User>). Thing is, many time we need to override the default behavior of a method. For instance we might want to change Add(User) to notify the user by mail, write something to a log, use caching, etc. We do that in a UsersDal class that inherits from UsersDalBase. But hmm, that other overload that accepts a list of users is still there. No one uses it for now, but...