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

Tip: how to speed up XEmacs start



Hi,

If you are in a hurry do
    touch /tmp/.sockets/audio0
otherwise read on :)

I was qurious about what makes XEmacs so slow at startup. With the help of 
the strace(1) utility I found the following interesting behaviour of 
XEmacs19. The XEmacs I am using is version 19.16-1 which comes with the 
unstable distribution.

When XEmacs starts up it creates a UNIX domain socket and tries to connect it 
to /tmp/.sockets/audio0. If this special file does not exist (ENOENT is 
returned) it does nanosleep(2) five times and sleeps about 1 second each 
time. Only after nanosleeping it will continue loading.

If a plain file named /tmp/.sockets/audio0 is created XEmacs gets 
ECONNREFUSED as return value and goes on without nanosleeping or retrying. 
This speeds up the startup time for about five seconds on my machine. 
/usr/bin/time reports the time going from about 8.7 to 3.7 seconds.

I hope you find this tip useful,

// Heikki
-- 
Heikki Vatiainen                  * hessu@cs.tut.fi
Tampere University of Technology  * Tampere, Finland



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: