Tuesday, June 26, 2007

Why Is My Computer So Slow?

The list of computers I've owned and used over the years almost sounds like some kind of computer museum. It includes (but isn't limited to) the following:


My early computers (the TRS-80 Color Computer and Commodore 64) were great machines, but even I'll admit they only had enough power for one person to run one application at a time (generally speaking). (Yes, I'm aware there were multi-user, multi-tasking operating systems available for the TRS-80 Color Computer and the Commodore 64, but I'm aiming this article at a more general audience.)

The Fat Mac and Amiga were another story. They easily had enough power for one person to run multiple applications at the same time, those applications being reasonably modern (GUI based). They also had enough power for dozens of users to run simple (likely text based) applications at the same time (though you would need to install an alternative operating system on the machine).

Jump to the 25 MHz 80386 and 90 MHz Pentium, and we're entering a new realm of power. These machines, when using the right operating system, could handle multiple users running multiple applications at the same time, those applications being reasonably modern (GUI based). In fact, the 90 MHz Pentium has enough power to handle the needs of most modern users: web browsing, email, word processing, even listening to music. (To be fair, though, decoding MP3 audio requires enough power that it would cease to be a good multi-user machine).

Enter the 600 MHz Pentium III, more than enough machine for, most likely, 95% (or more) of the computer using population. Decode MP3 audio? No problem. Watch HD video? No problem. Unless you're editing your own movies, this machine probably has all the power you need (and then some).

Last, but not least, the AMD Athlon 64 3200+. By today's standards (at the time this article was written, June 2007), this machine is already starting to show its age, but it's a beast with some serious power. With the right operating system, it could easily support dozens of users running multiple applications at the same time, those applications being very modern (GUI based, with all the bells and whistles).

And yet, too often, the performance disappoints. I type a few letters into my word processor, and at that exact moment, the operating system (Windows XP Professional) decides I'm less important than something happening in the background, and I see a noticeable delay before my typing appears on the screen. Perhaps I restore a program that's been minimized and idle for a while, and wait while the hard drive grinds and brings my application back up (and, in case you're interested, I never exhaust the physical RAM in this machine, which has 2 GB). Or perhaps I decide to listen to some music in iTunes, and watch it slowly boot up. There are many other examples of the computer being just plain lethargic.

What's going on here? We all have the equivalent of supercomputers on our desks, with far more power than we really need. How could it be that we ever wait so long for such mundane things to happen on our computers?

A big part of the problem, probably the primary problem, is the operating system (usually Windows). It should be smarter. The computer is our electronic servant, and should always give their owner a higher priority than, well, anything else. For example, I should never see a delay while typing in my word processor. I should never encounter a delay while restoring an application that's been idle for a while (unless I exhaust physical RAM and it has to be restored from disk, but once again, I never exhaust physical RAM). Microsoft is obviously doing something terribly wrong inside Windows.

Another part of the problem is software development. As computers have gotten faster, software developers have used increasingly easier computer programming languages. There are a lot of advantages to using languages that are easier to use and faster to develop with, but each and every user of your application pays a performance penalty. Perhaps too much of a performance penalty in some cases? I love the safety and ease of use of these modern languages as much as the next software developer, but frequently, I can't help but think that perhaps my users would be better served if I was using a more efficient language, even if it made my job harder.

If you'd like to get a taste of the kind of speed and responsiveness you could see from your computer if you were using more efficient software, consider giving Damn Small Linux a test drive. It's a very small, efficient operating system, but also very capable and powerful. I've got it booted right this minute, with a few applications running (including the Firefox web browser), and the entire thing is consuming just 50 MB of RAM. In fact, the entire OS itself (with all sorts of handy applications) is just 50 MB -- about 1/14th the size of a single CD.

The next time you ask yourself, "Why is my computer so slow?", you should already know the answer: Because the people who wrote your operating system and your applications decided their time is more important than yours. You might want to consider using more efficient operating systems and applications.

2 comments:

Unknown said...

Keeping in mind that you are a developer, what language do you code in? How much time is spent making sure the performance is acceptable? What is the performance like of the resulting applications? Now, the big questions, why is it that way? Do you think you could run a retail software company differently and still remain profitable?

I think the answers to these questions are obvious. The application code I have worked on would perform 10x better (at least) if it was written in a very low level language with an eye toward performance. It would have taken much much longer to code. It would have cost much more to produce and, as a result, would cost much more to the end user. The competition would have more features and beat it to market by quite a bit.

100 year old scotch is great but coke sells.

Rick Kimmel said...

My dad always jokes about this. I even remember him saying it when we upgraded from an Apple ][+ to an Apple //e...

"Programmers always seem to find a way to fill the void opened when new resources are available."