mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] Edwin slow file save over WebDAV


From: Richard Loveland
Subject: [MIT-Scheme-devel] Edwin slow file save over WebDAV
Date: Wed, 20 Mar 2013 16:06:32 -0400

On Tuesday, December 11, 2012, Taylor R Campbell wrote:
Whoops, looks like I neglected to answer this last month.

   Date: Thu, 1 Nov 2012 10:05:13 -0400
   From: Richard Loveland <address@hidden>

   My layman's interpretation is:

   1. write the file (quick)
   2. do something called `thread_selfid' (slow)
   3. stat the `Invoice Service.txt' file (quick, it exists)
   4. stat the `.git' directory, which does not exist (slow)

   The dtruss output is littered with these stat calls to non-existent
   version control directories -- I'm guessing they just correspond to
   `file-exists?' type procedures?

Sounds about right: vc is trying to detect whether you're using any
revision control system by statting the revision control files and
directories.  Unfortunately, at the moment, there's no good way to
turn this off...  Perhaps we ought to have a variable controlling
whether vc autodetection happens, which VC-HOOK:FIND-FILE would check,
or something like that.

I've created a patch (attached) that solves this issue for me. Rather than turn off VC-HOOK:FIND-FILE, I've enabled a quicker check in VC-HOOK:AFTER-SAVE of whether a buffer has the 'VC-MASTER property when the file is saved. The previous version of VC-HOOK:AFTER-SAVE was calling the same procedure (BUFFER-VC-MASTER) as VC-HOOK:FIND-FILE. Unfortunately, BUFFER-VC-MASTER calls several nested procedures, each of which perform loops. I suspect that this heavy checking is worthwhile when opening a file, since the buffer's 'VC-MASTER property doesn't exist yet, but seems unnecessary in the VC-HOOK:AFTER-SAVE case (since VC-HOOK:FIND-FILE should already have run and set 'VC-MASTER).

This results in a speedup of factor 5 or so when saving files mounted via WebDAV (~30 seconds down to ~6). Now Edwin's performance is directly on par with GNU Emacs when saving these files on my system.

Please let me know if this patch is acceptable. If so I'm happy to sign papers, etc. as needed.

Attachment: vc.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]