# Is there a performance penalty in using a mapped share from the same machine instead of the local filesystem?

I have a machine setup to share c:\apps. I then map the share to drive letter Z: on the same machine. Would an application running from the Z:\ drive run slower than if I ran it from C:\apps? If so, how much?

In other words, would it run slower because it has to go through the network when running from drive Z:? Or is it smart enough to bypass the network and just access the C: drive?

-

Assuming any fairly recent version of Windows, you shouldn't see any performance difference; modern versions of Windows are generally smart enough to short-circuit unnecessary trips to the network.

Of course, you could always benchmark it and see for sure.

-

On Windows XP SP3, the performance difference is huge. Here's an example running msysgit on the same folder, first via a mapped network drive then via a regular drive:

# Z:
$time git log > /dev/null real 0m1.518s user 0m0.045s sys 0m0.061s # C:$ time git log > /dev/null
real    0m0.382s
user    0m0.061s
sys     0m0.046s


This might not be an issue for your use case, or even most use cases. However, in this case, this application becomes slower by one order of magnitude and that hinders its usability quite a bit.

The alternative that have I found is to use the subst command:

subst z: c:\some\longer\path

-

Network share will be accessed through local loopback interface (127.0.0.1). I'm not sure about performance implication, probably negligible, may be higher CPU load. But you will be accessing it as a network user. So if you have read-only share you will not be able to write to it. However you can write to the same folder when accessing it through the file system.

-