Updated 25-May-2005: Finally! Some authoritative input on this issue! Ryan Myers, a developer on Microsoft’s Windows Client Performance Team, wrote a very informative blog post, “Misinformation and the Prefetch Flag,” that clears up several of these issues. I’ve revised some remarks below in accordance with his entry.
In today’s tip of the day, I warned about following advice from so-called Windows experts who don’t really know their stuff. Case in point: the thousands of Web sites that pass along the bogus advice to clean out your Prefetch folder. (No! Don’t do it!)
A commenter who read that tip asked a great question:
What do you think about adding /prefetch:1 to shortcuts? Does it make any difference? I’ve read on several forums to use the switch for quicker application launches but I haven’t really noticed any increase in speed.
I’d never heard of this tweak, so I did a Google search for prefetch switch program shortcuts and found more than 10,000 Web pages that advise making this speedup tweak. In the rest of this post, I explain why they’re all wrong.
A typical entry was this almost comical thread on the message boards at Winguides.com, in which one self-taught expert pitches this tip and then fends off all requests for a link to any documentation that might explain why this tweak should work. (He gets pretty huffy about it, actually, and the level of forced politeness in this exchange is unintentionally hilarious.)
This urban legend got started, apparently, when someone took a close look at the properties of the Windows Media Player shortcut in Windows XP and noticed that the shortcut included this parameter at the end. (See for yourself: Right-click the Media Player shortcut on the Start menu or the Quick Launch bar, click Properties, and look at the value in the Target field, as I’ve done here.)
Based on this entry, someone leaped to two unjustified conclusions:
- They assumed the /prefetch switch here is directly related to the files and settings stored in the Prefetch folder. According to this logic, adding /prefetch:1 forces Windows to look in the Prefetch folder when the program runs, so that it can use those settings to load it faster.
- They assumed that this same switch will work with any program. Most variations of this tip suggest that you add the /prefetch:1 switch to the end of all your program shortcuts and even edit the registry in several places to speed up program loading.
Unfortunately, these assumptions are wrong and wronger. [Update: Ryan Myers explains that one of my original assumptions was wrong also. The /prefetch flag is not specific to Windows Media Player. It can be used when you start any process. However, it doesn't do what the tipsters think it does, as he explains in more detail here:
The /prefetch:# flag is looked at by the OS when we create the process -- however, it has one (and only one) purpose. We add the passed number to the hash. Why? WMP is a multipurpose application and may do many different things. The DLLs and code that it touches will be very different when playing a WMV than when playing a DVD, or when ripping a CD, or when listening to a Shoutcast stream, or any of the other things that WMP can do. If we only had one hash for WMP, then the prefetch would only be correct for one such use. Having incorrect prefetch data would not be a fatal error -- it'd just load pages into memory that'd never get used, and then get swapped back out to disk as soon as possible. Still, it's counterproductive. By specifying a /prefetch:# flag with a different number for each "mode" that WMP can do, each mode gets its own separate hash file, and thus we properly prefetch.
So, another program could use this flag to create separate hashes in the Prefetch folder that would allow different sets of data to be prefetched for different purposes. But no app does this except Windows Media Player.]
The /prefetch switch is specific to Windows Media Player. It controls the amount of content that is buffered when you begin playing a media file. The number that appears after the switch defines the amount of content to be buffered (“fetched”) before playback begins. If you look through the registry, you’ll see that the number that follows the /prefetch switch varies for different types of media files. MP3 and MPEG files use /prefetch:9, while Audio CDs use /prefetch:3. DVDs are 4 and AVI files are 8. The exact meaning of each /prefetch setting for Windows Media Player isn’t documented anywhere that I can find, but you can read all about the basic principles in this extremely technical article aimed at driver developers. (And no, I don’t recommend messing with this parameter for different media types; I assume that the WMP developers know best about this setting.)
Given that this parameter is designed to improve media playback performance for a specific program (Windows Media Player), it’s pretty silly to think that it will have an effect on Windows Messenger or Windows Explorer or WordPerfect, as WinGuides.com recommends. (And if it did, why not use a bigger number? Why stop at /prefetch:1? Why not go to /prefetch:9 or, for that matter, all the way to /prefetch:11?)
What they don’t realize is that a program’s developer defines which command-line switches work with that program. If you stick a random unsupported switch at the end of a shortcut, the program will either ignore it or give you an error message. But it won’t magically speed itself up, any more than it would if you were to tack the /abracadabra switch on the end of the command line.
I find it remarkable that there are more than 10,000 Web pages containing some variation of this tip. Like all urban legends, misinformation of this type takes on a life of its own, and pretty soon people start to believe it’s true because they’ve read it on so many Web pages.
[Update: Ryan Myers reinforces this conclusion when he says, "I suspect that the 'add /prefetch:1 to make rocket go now' urban legend will never die, though. I know that at least one major company ships products with it in their shortcuts, without ever asking us... just for good measure, I guess. "]
My advice? If someone tells you to make this “tweak,” scratch them off your list of trusted information sources. They don’t know what they’re talking about.