At least once a week I run across some well-meaning soul who passes along a dubious tip designed to enhance the performance of Windows XP. According to these folks, you should clean out the Windows Prefetch folder regularly to improve your system’s performance. They’re wrong, because they don’t understand how this feature works. Even generally reliable sources like Fred Langa can get tripped up. Here’s what you need to know:
The Prefetch folder is not a cache – at least not in the sense that you normally think of when you use that term. This folder contains trace files and layout files that Windows uses in specific circumstances. Trace files describe the exact order in which segments of programs (executable files and dynamic link libraries, including those that make up Windows itself) load. Windows uses this information to launch Windows and Windows programs in the most efficient way possible. Layout files provide a list of files and directories in the order that they are accessed when you start your computer or run a program. The Windows XP Defrag program uses the layout information to arrange these files in a contiguous region of the hard drive. The “prefetching” doesn’t mean that code is being loaded unnecessarily; it means that code is being loaded in the right way, and only when it’s needed.
Cleaning out the Prefetch folder will not improve performance. I have proved this with a stopwatch repeatedly on multiple test systems, and documented the results in Windows XP Inside Out Second Edition. In fact, emptying the Prefetch folder will actually reduce performance, because Windows has to re-create the trace files the next time you run the program. Windows cleans out old files here automatically, and it uses the current information simply as instructions to help load programs more efficiently. If you delete a program, its layout and trace files go unused and are deleted within weeks.
This isn’t the first time I’ve written about the Prefetch folder. I have a detailed write-up on the subject here. Be sure to follow the links to the excellent article by Mark Russinovitch and David Solomon and scroll down to the section entitled Prefetch, which explains how this feature works in very clear detail.
The next time someone tells you that cleaning out the Prefetch folder is a performance-enhancing measure, tell them it just isn’t so.