Package: emacs22-bin-common
Version: 22.2+2-5
Severity: normal
When opening a file that's under version control, Emacs automatically
checks the file status against the version control system. That's
convenient, but it can lead to performance problems. In the case of
Bazaar, Emacs runs "bzr status $file" twice for each file, as shown by
this strace excerpt:
$ strace -f -eexecve emacs Makefile* 2>&1 | grep execve
execve("/usr/bin/emacs", ["emacs", "Makefile", "Makefile.debian",
"Makefile.rh"], [/* 39 vars */]) = 0
[pid 21614] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status", "Makefile"], [/*
42 vars */]) = 0
[pid 21615] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21616] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
[pid 21617] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status", "Makefile"], [/*
42 vars */]) = 0
[pid 21618] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21619] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
[pid 21620] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status",
"Makefile.debian"], [/* 42 vars */]) = 0
[pid 21621] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21622] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
[pid 21623] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status",
"Makefile.debian"], [/* 42 vars */]) = 0
[pid 21624] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21625] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
[pid 21626] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status", "Makefile.rh"],
[/* 42 vars */]) = 0
[pid 21628] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21629] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
[pid 21630] execve("/usr/bin/bzr", ["/usr/bin/bzr", "status", "Makefile.rh"],
[/* 42 vars */]) = 0
[pid 21631] execve("/bin/sh", ["sh", "-c", "uname -p 2> /dev/null"], [/* 42
vars */]) = 0
[pid 21632] execve("/bin/uname", ["uname", "-p"], [/* 42 vars */]) = 0
I can see two problems with that:
- First, why run bzr status twice? Especially with Bazaar, whose
start-up time is a couple of hundred milliseconds, that leads to a
noticeable delay when opening files.
- Second, why run it on each file individually? Many version control
systems (at least starting with CVS), can give information on
several files at once.
These problems are not very annoying when one just wants to open one
file (one just waits for half a second instead of a quarter); but when
opening lots of files (think "grep -rl something . | xargs emacs"),
this potentially leads to several minutes of delay.
Roland.
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages emacs22-bin-common depends on:
ii emacs22-common 22.2+2-5 The GNU Emacs editor's shared, arc
ii libc6 2.7-18 GNU C Library: Shared libraries
ii liblockfile1 1.08-3 NFS-safe locking library, includes
emacs22-bin-common recommends no packages.
emacs22-bin-common suggests no packages.
-- no debconf information
--
Roland Mas
prw-r--r-- 1 root root 0 Jan 1 1970 This-is-not-a-pipe|
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]