Why symlinks can slowdown git?

5

1

I keep my current working project on SSD drive but git folder inside is symlinked from another (encrypted) disk with mklink /J /D.

SmartGit warned me that using symlinked git folder may have a negative impact on a refresh performance.

I understand that git won't use SSD speed but a slowdown caused by a symlink itself doesn't make a sense for me.

Vlad

Posted 2016-03-09T08:09:05.307

Reputation: 148

Answers

1

Every operation that interacts with a file through a symbolic link has to lookup the file twice. The first lookup will locate the link, which will give the location of the actual file. The second lookup will follow the linked address to the data. Operations like this are very small and won't impact performance a lot, but as the number of linked files and operations scale up it can become noticeable.

Your specific case adds some elements that could make the second lookup slower than the first. First, your data is on a separate filesystem on a separate disk. Second, the data itself is encrypted. Both of these could impact performance.

D34DM347

Posted 2016-03-09T08:09:05.307

Reputation: 624

1Can you describe please why "your data is on a separate filesystem on a separate disk" affects things? Does it matter where the second lookup goes - same or another drive? – Vlad – 2017-01-12T08:30:35.923

It could be affected by a number of factors such as how the drives and volumes are configured in Windows, as well as the disk's read and write speeds. – D34DM347 – 2017-01-12T12:46:51.093