8

I am not sure if it is a metropolitan legend, but I'm asking me if a temporary directory on Windows Vista PC with a lot of file (~30.000) could slow down the entire machine.

I would like to get some technical reference possibly in the Microsoft documentation.

Any idea?

1
  • The temp folder is a favorite place for malware to hide, Keep it cleaned out on a regular basis.
    – Moab
    Jan 26, 2011 at 17:59

3 Answers 3

5

Yes, a huge number of files in the temp directory can indeed slow down your Windows system. A couple of examples can be found here and here and here

Some of the reasons for this are that anytime an application creates or reads a temporary file from this folder, Windows has to process the folder's contents (i.e. to find the file or to see if a duplicate file is being created, etc). Another reason is that whenever Windows goes looking for an application to execute where the exact file path is not known, it first iterates through all the files in all the directories listed in the system's PATH environment variable. In many systems, the temp folder is included on this list of folders.

In general it is good practice to clear out the TEMP folder(s) on a regular basis. Some people say weekly, some monthly.

5
  • 1
    link1 is just about leftovers from the call to CryptQueryObject() and has 0 relevance regarding speed, link2 is about the number of apps running and startup apps and again 0 relevance and link3 is about cleaning up the temp-folder which has again 0 relevance regarding speed. and, as you correctly points out: windows has to do something when a file is modified, created, deleted. how does a static file slower the system?
    – akira
    Jan 26, 2011 at 13:57
  • 3
    @akira: Apps that use the WinAPI GetTempFileName call can be affected by the number of files in the temp folder if they're not properly cleaning up, because the API call basically increments a counter, checks for the existence of a file using that counter as part of the filename, and keeps going until it finds an available name. I've seen various apps get progressively slower (or even crash) because there's several thousand temp files that were never properly cleaned up and the API call takes ages to complete.
    – afrazier
    Jan 26, 2011 at 14:14
  • I've never seen a system where %TEMP% is on the system or user's path. That said, I have a script I deploy on systems to clean out all temp folders (system & user) on system startup, before any users log in.
    – afrazier
    Jan 26, 2011 at 14:24
  • @afrazier: i didnt neglect the problem, i was pointing out the weakness of @BBlake's answer. your comment would be a nice answer for example.
    – akira
    Jan 26, 2011 at 14:25
  • @akirs: @BBlake's answer wasn't wrong, though the justifications used were, as you pointed out. I was just trying to add some useful information to help flesh it out. I wasn't sure that adding another answer was the way to go. Time to scour meta. :)
    – afrazier
    Jan 26, 2011 at 20:19
2

Everyone knows that Windows and most programs create temporary files for your use. However, not all programs erases the drafts created, leaving the temp files in user's system.

Temporary files take up space in HD, like any other file. By themselves, they do not reduce performance. But gradually, as more and more useless files are getting stored, the computer begins to slow down because of the fragmentation of data in HD. Besides the wasted space that can reach several gigabytes of hard drives of those who never cleans temp files.

You might think, "with huge hard drives, no need to be cleaning up temp files." Not exactly ... The more space and more time to use your HD, the more it is getting temp files.

Moreover, many programs saves their registers and don't clean it. The registry is a database on Windows, whose purpose is to store, in an organized way system settings, from Windows itself, and programs that want to use it.

There are different sections of registry for each program, but many do not clean their settings and data when they are uninstalled. After some time, this will leave the registry full of settings of old programs you no longer use. For this reason it is good to clean your HD from old registry, but this is practically impossible to do manually.

To start, the registry is not an text file is an binary file that follows an specific format. Windows has an editor, well known: the "regedit". But there are so many places that can store old or unused data, the manual search for them is not a good idea. For this we need to use registry cleaners applications as well.

Recommended applications: CCleaner and RegClener

I based my answer at this site (sorry it is in Portuguese): http://www.guiadohardware.net/artigos/limpando-temporarios-windows/

1
  • Thanks for the answer, but I don't know the Portuguese! Useful answer anyway :-)
    – robob
    Jan 26, 2011 at 13:45
1

It could slow the boot time of the system as the temp directory is usually cleaned up just after bootup (atleast in case of most Debian-like Linux).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .