PCs

Change the icon cache size in Windows XP Pro

Speed screen redraws by increasing the size of the icon cache.

By definition, the Windows GUI can represent files, folder, programs, and other things on your computer graphically, almost always with an icon of some type. You've probably noticed how some users love to copy every icon they ever click to their desktops, turning it to a vast junkyard of tiny pictures. They'll copy all of these icons to their desktop and then ask you why it takes so long for the desktop to refresh.

With a quick change in the Windows XP registry, you can increase the icon cache that XP uses to store icon information. Doing so will speed up desktop refreshes on your users' workstations without having to remove the precious icons that are slowing them down in the first place.

Danger!
This article discusses making changes to your server's registry. Before performing any technique in this article, make sure you have a complete backup of your workstation. If you make a mistake when making changes to your workstation's registry, you may cause your server to become unbootable, which would require a reinstallation of Windows to correct. Proceed with extreme caution.

What does the icon cache do?
You're probably familiar with the way a hard drive cache works. Because a workstation can access information from RAM faster than it can from a hard drive, it copies file information to a temporary location in memory. When the operating system needs access to a file, it checks the cache first, loading the file quickly if it's in cache or physically reading the file from the hard drive if it's not.

The icon cache works much the same way. Rather than physically accessing XP's Iconcache.db database to display every icon on your workstation, XP first checks the icon cache in RAM, and then looks to the database file if it can't find the icon in RAM.

By default, Windows XP doesn't reserve a lot of memory for icon caching. By sacrificing a little bit of RAM, you can speed up perceived workstation performance.

Speeding things up
You'll make the changes in the system registry. Start the Registry Editor by selecting Run from the Start menu, typing regedit in the Open text box, and clicking OK. When the Registry Editor opens, navigate through the left pane until you get to the HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Explorer. In the right pane, look for the value named Max Cached Icons.

If the value exists, it's probably set to 500, which is the default value for the key. To change the value, double-click it. You'll then see the Edit String screen. Enter a value of 2000 in the Value Data field and click OK.

If the value doesn't exist, you'll need to add it. Select New | String Value from the Edit menu. The new value will appear in the right pane, prompting you for a value name. Type Max Cached Icons and press [Enter]. Make sure you separate each word with a space. The proper value is Max Cached Icons, not MaxCachedIcons.

Double-click the new value. You'll then see the Edit String screen. Enter a value of 2000 in the Value Data field and click OK. When you're done, your Regedit screen will look like the one in Figure A.

Figure A
Add the Max Cached Icons key to your registry.


When you're done, close Regedit. Your registry changes will be saved automatically. Reboot your workstation. When your workstation restarts, you should notice that the desktop refreshes faster.

Icon cache caveats
Adjusting the size of the icon cache works best on workstations that have more than Windows XP's minimum system requirements. Because you're altering the amount of system memory reserved for caching, you're reducing the amount of memory available to run applications. If a workstation is running low on memory, it will start swapping applications out to the page file, slowing overall system performance.

If the icons still refresh slowly, you're not completely out of luck. You can try to increase the size of the icon cache and reboot again. When doing research on this registry setting, I found various opinions as to the proper file size with "recommendations" for setting the value to anywhere from 1024 to 8192. 2000 is the value recommended by Microsoft to increase performance. Taking into consideration the fact that the icon cache borrows from system RAM, this is a good first value to try.

Additionally, I discovered some debate as to the actual proper name of the registry key. Some people referred to the key as MaxCachedIcons while others, including Microsoft, referred to the key as Max Cached Icons. This is the value I used on my test workstation and it seemed to make a difference, whereas the other didn’t seem to have an effect.
0 comments