7

The environment variable Path contains the places where Windows looks for programs to run files having the different extensions. More directories would mean more places to look in for the relevant programs, hence if there are a lot of directories, will Windows performance degrade over time?

I did try searching on Google, but I could not find anything, either for, or against, my question.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
asheeshr
  • 4,088
  • 6
  • 31
  • 50

2 Answers2

3

One thing that will effect your performance if you put it in the PATH are network locations.

You really want to avoid that, especially on unstable networks. Trying to access an unavailable location on the PATH is horrible in terms of performance.

user1708860
  • 1,683
  • 13
  • 32
2

Technically, it will most likely require more time to search more pathes. Practically it probably matters not one bit unless someone goes to the extreme to add thousands of pathes. Windows also uses some caching for the filesystem to accelerate such searches.

Durandal
  • 19,919
  • 4
  • 36
  • 70
  • 2
    Windows uses caching even within the paths available ? The same process occurring thousands of times, every time you turn on windows will "not matter one bit" ? I would think it will add a few seconds of loading time in every use, which is something people do care about. Dont mean to be argumentative. – asheeshr Aug 12 '12 at 15:27
  • The filesystem will cache the directory contents, of course it needs to be read at least once when the system first searches a directory. But that will take only fractions of a second for normal sized directories (open a cmd and try 'dir C:\Windows\System32 >NUL' for example - what takes 2-3 seconds to *list* the contents to the console suddenly takes no perceivable time once you redirect the output). The filesystem is a lot faster than most user interfaces make it seem. – Durandal Aug 13 '12 at 10:45
  • 1
    Note of course that adding the PATH directories to the cache means less memory for caching other things. (And we're assuming that all PATH directories are cacheable. Network locations aren't.) – Raymond Chen Dec 29 '12 at 15:55