This question appeared on a bulletin board recently:
Someone suggested deleting the contents of the Prefetch directory in Windows XP on a weekly basis, to speed up the boot process. Is that good advice?
The Internet has a way of taking questionable facts and giving them a life of their own. Even bad advice about Windows has a way of spreading, just like urban legends. This is one of those “tips” that doesn’t survive even a cursory analysis.
The Prefetch directory serves a valuable purpose by analyzing files that you use at startup and when you run programs. Contrary to what some well-meaning but technically inaccurate articles suggest, this does not copy the files themselves. It creates an index to the location of those files on the hard disk, including the order in which they’re loaded. This allows Windows and Windows programs to start very quickly after the first time you use them.
The Prefetch directory has one additional salutary function when used in conjunction with the built-in defragmenting tool. Every three days, during idle times, this utility rearranges program code, moving it to the outside of the disk to make it more efficient when loading (to force Windows to perform this optimization without having to do a full defragmentation, use the Defrag.exe command with the -b switch. For instance: defrag c: -b).
Carl Siechert, Craig Stinson, and I actually devoted several pages of Windows XP Inside Out to this topic. That was almost two years ago, though, and I’m willing to keep an open mind that we might have missed a great tip. So, just for grins, I got out my stopwatch and clocked my system boot time. Then I cleared out the Prefetch directory and did it again. My system has been running nonstop for 7 months and I have never touched the Prefetch directory. If this “tweak” were going to do any good, surely it would have maximum effect on my computer, right? The results were illuminating.
I timed from power up, starting with the first beep (POST code) to the point where the hourglass cursor disappeared.
With a full Prefetch directory:
… 0:50 to login screen
… 1:08 to desktop
After emptying Prefetch directory:
… 0:58 to login screen
… 1:57 to desktop
In other words, it took me nearly a minute longer to boot after using this “speedup” tip!
When I Googled for this topic, I found tons of examples of people who had simply copied this advice to their list of “tips” without any explanation of why it would be valuable or whether it actually affects performance. Mark Russinovitch and David Solomon, for instance, wrote an excellent article called Windows XP Kernel Improvements Create a More Robust, Powerful, and Scalable OS in the December 2001 issue of MSDN Magazine. Their technical credentials are impeccable, and they speak very highly of this feature.
The few people who did discuss it in those terms were unanimous in recommending that you leave Prefetching on.
Furthermore, why worry about boot times anyway? I recommend that most people avoid restarting their computer except when it’s absolutely required. Windows XP is so stable you can leave it running for weeks at a time and only restart on those rare occasions when you have to do so. If you need to shut down the computer, use the Hibernate option instead, which allows you to resume in seconds, with all your programs loaded just the way they were when you shut down.
If you really want to improve performance, forget bogus tweaks like this one and do the following: increase the amount of RAM in your computer (at least 256MB), get a good defragmenter (Diskeeper is the best), and remove programs you don’t use (or at least configure them so they don’t start automatically).
Update, March 2005: This “tip” just won’t die. It still appears all over the Internet, including at some places that should know better. We revisited the topic for the second edition of Windows XP Inside Out and found that cleaning out the Prefetch folder still does nothing positive for performance. If you think otherwise, get a stopwatch and run your own tests.
Update, May 2005: Microsoft’s Ryan Myers has an excellent blog post on the subject, entitled “Misinformation and the Prefetch Flag.” Here’s the money quote: “[I]t is a bad idea to periodically clean out that folder as some tech sites suggest. For one thing, XP will just re-create that data anyways; secondly, it trims the files anyways if there’s ever more than 128 of them so that it doesn’t needlessly consume space. So not only is deleting the directory totally unnecessary, but you’re also putting a temporary dent in your PC’s performance.”
Be sure to read these follow-up articles as well: Don’t clean out the Prefetch folder, Debunking yet another bogus Windows tip, and One more time: do not clean out your Prefetch folder!