performance

user experience

Speed Still Matters

I remember switching my homepage from AltaVista to Google back in 2000 for one simple reason: it was blazingly fast. It's the same reason I don't use personalized Google, or Google suggest as my homepage: they're simply too slow. Dare Obasanjo* wonders if AJAX

By Jeff Atwood ·
Comments

regex

Regex Performance

I was intrigued by a recent comment from a Microsoft Hotmail developer on the ptifalls they've run into while upgrading Hotmail to .NET 2.0: Regular Expressions can be very expensive. Certain (unintended and intended) strings may cause RegExes to exhibit exponential behavior. We've taken several

By Jeff Atwood ·
Comments

c#

TryParse and the Exception Tax

In .NET 1.1, TryParse is only available for the Double datatype [http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDoubleClassTryParseTopic.asp] . Version 2.0 of the framework extends TryParse to all the basic datatypes [http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=1239]. Why do we care? Performance. Parse

By Jeff Atwood ·
Comments

hardware

What if it was infinitely fast?

When it comes to performance, there's always a bottleneck. The question is, which bottleneck? That's why one of the more interesting back of the envelope calculations is to ask, "what if it was infinitely fast?" One way to make something infinitely fast is to

By Jeff Atwood ·
Comments

performance

For Best Results, Don't Initialize Variables

I noticed on a few projects I'm currently working on that the developers are maniacal about initializing variables. That is, either they initialize them when they're declared: private string s = null; private int n = 0; private DataSet ds = null; Or they initialize them in the constructor:

By Jeff Atwood ·
Comments

hardware

Desktop RAID: Oversold?

I've seen a number of hardware-oriented developers [http://www.iunknown.com/CommentsWithEntry.aspx?entryid={1D2B47DB-E479-472F-9BE9-1D23AA72C73A}] talk about setting up striped RAID arrays on their personal desktops. It does seem like a reasonable idea, given the current strong trend towards "doubling up" on hardware to leverage performance

By Jeff Atwood ·
Comments

compression

Compression and Cliffs

I set up a number of Windows XP SP2 Virtual PC base images today. A WinXP SP2 clean install, after visiting Windows Update, is 1.70 gigabytes. Building up a few baseline images like this can chew up a substantial amount of disk space and network bandwidth. So, taking a

By Jeff Atwood ·
Comments

.net

Troubleshooting .NET performance using Peanut Butter

Here's some excellent, concise advice on troubleshooting performance in managed code [http://blogs.msdn.com/ricom/archive/2005/05/25/421926.aspx]. It all starts with peanut butter, naturally: > My last entry [http://blogs.msdn.com/ricom/archive/2005/05/23/421205.aspx] was some generic advice

By Jeff Atwood ·
Comments

performance

On Managed Code Performance, Again

Managed code may be fat and slow, but it fares surprisingly well in Rico's C# port of Raymond Chen's C++ Chinese/English dictionary reader: Sure, the C++ version eventually outperforms the managed code by a factor of 2x, but what's interesting to me-- and

By Jeff Atwood ·
Comments

security

On Managed Code Performance

My personal turning point on the importance of managed code was in September 2001, when the NIMDA worm absolutely crushed our organization. It felt like a natural disaster without the “natural” part – the first notable port 80 IIS buffer overrun exploit. We got literally zero work done that day, and

By Jeff Atwood ·
Comments

regex

To Compile or Not To Compile

I am currently in the middle of a way-overdue refactoring of MhtBuilder, which uses regular expressions extensively. I noticed that I had sort of mindlessly added RegexOptions.Compiled all over the place. It says “compiled” so it must be faster, right? Well, like so many other things, that depends: In

By Jeff Atwood ·
Comments