3

It takes TortoiseHG about 15 minutes to perform a push from a repository on my local hard drive (where the .hg directory contains 532 files totalling 110MB) to a bare repository on my network drive.

However, if I just use Windows explorer to copy-paste the same .hg directory (532 files, 110MB) to the same network drive, it takes about 30 sec to 1 minute.

Why this slowdown by a factor of 10-30? Can I avoid it? (i.e. is Mercurial doing something unnecessary that I can avoid with the appropriate command-line options?)

Update: it's slow enough that it is having a negative effect on our workflow. And, the same push from one location to another on the local HD is fast (several seconds as opposed to minutes). This means it would actually be much quicker to copy the complete remote .hg directory to a temporary location on the local drive, push to it, then copy it back to the network drive. Before I consider actually implementing this clumsy workaround... surely there's a better one??

[Details: I'm using command-line hg.exe from TortoiseHG 3.4.1 on Windows 7, and the network drive is an Apple TimeCapsule. I access it via the Airport Base Station Agent software, which creates the appearance of a normal (i.e. samba-like) network drive. The drive is mounted as Z:\, and so the default path listed in hgrc begins with Z:\, so as far as mercurial knows, the push is happening from one "local" location to another, i.e. not over http or ssh. The same slowdown happens if I use the full UNC path \\Like\this\... instead of Z:\...]

5
  • (Assuming your concern is for the first push..) I guess the question is, why do you think this is slow? Have you any experience of mercurial, git, fossil or other similar systems working faster? It's normal that a source control system's synchronisation is slower than a direct file copy. File copy is a direct file system copy. Mercurial push/pull is a layer of source control over the file system, which will do checks and pick out only the necessary branch (e.g. master) and its objects. Another question may be, is 10 times slower an issue; for what it's worth, I don't think it's an issue.
    – jehad
    Jul 8, 2016 at 21:27
  • 3
    No, I think there's a genuine issue. I just tried the same push from one place on the local hard disk to another: it takes a several seconds as opposed to minutes. This means that it would actually be more efficient to (1) copy the complete remote .hg from the network disk to a temporary location on the local disk, (2) perform the push from local HD to local HD, (3) copy the complete (and now augmented) temporary local .hg back to the remote network disk. This indicates that something is very inefficient in the way Mercurial handles network storage. Maybe certain command-line switches help?
    – jez
    Jul 20, 2016 at 14:35
  • Did you ever figure this out?
    – Michael
    May 21, 2023 at 6:55
  • @Michael no I don't think so. At the time I think I just changed the architecture entirely to avoid relying on the network share. In the meantime I was forced to transition to git anyway and would not want to go back, so all Mercurial issues are forgotten.
    – jez
    May 22, 2023 at 16:06
  • fair enough....
    – Michael
    May 22, 2023 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .