Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xemacs 21.5.32 very slow start-up

54 views
Skip to first unread message

Zapatero

unread,
Aug 20, 2012, 6:31:17 PM8/20/12
to

I downloaded and built xemacs-21.5.32 and built it with mostly default configuration settings on linux 2.6.32-131 using gcc 4.4.6.

Everything is cool accept for start-up which is painfully slow (takes upwards of five minutes on a 24-core machine!).

I used gdb and strace to see what's going on at start up... It appears to be processing all the lisp packages. I'm seeing 1600+ open and/or stat calls into /usr/share/xemacs/xemacs-packages/... For example:

stat("/usr/share/xemacs/xemacs-packages/lisp/eudc", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/usr/share/xemacs/xemacs-packages/lisp/eudc/", O_RDONLY) = 6
stat("/usr/share/xemacs/xemacs-packages/lisp/footnote", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
open("/usr/share/xemacs/xemacs-packages/lisp/footnote/", O_RDONLY) = 6

This is where start-up is painfully slow.

Makes me wonder if I don't have the packages installed correctly or something else is misconfigured.

Does anyone know how to fix this situation? Do I have the packages installed incorrectly?

-z

Michael Sperber

unread,
Aug 21, 2012, 2:31:25 AM8/21/12
to Zapatero

Zapatero <jschu...@silvertailsystems.com> writes:

> I downloaded and built xemacs-21.5.32 and built it with mostly default configuration settings on linux 2.6.32-131 using gcc 4.4.6.
>
> Everything is cool accept for start-up which is painfully slow (takes upwards of five minutes on a 24-core machine!).
>
> I used gdb and strace to see what's going on at start up... It appears to be processing all the lisp packages. I'm seeing 1600+ open and/or stat calls into /usr/share/xemacs/xemacs-packages/... For example:
>
> stat("/usr/share/xemacs/xemacs-packages/lisp/eudc", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
> open("/usr/share/xemacs/xemacs-packages/lisp/eudc/", O_RDONLY) = 6
> stat("/usr/share/xemacs/xemacs-packages/lisp/footnote", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
> open("/usr/share/xemacs/xemacs-packages/lisp/footnote/", O_RDONLY) = 6

There are 1600 of these? This looks like one stat per package, which is
what it should be. There sure aren't 1600 packages, so it would be
interesting to see how this list goes on.

(Even so, five minutes seems like a lot ... what kind of filesystem is this?)

--
Cheers =8-} Mike
Friede, V�lkerverst�ndigung und �berhaupt blabla

jschu...@silvertailsystems.com

unread,
Aug 23, 2012, 4:52:25 PM8/23/12
to
It's more like 800 of these directory reads... and it appears that it reads every .el file in each package-directory as evidenced by this example strace:
open("/usr/share/xemacs/mule-packages/lisp/egg-its/",

O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6
getdents(6, /* 54 entries */, 32768) = 1984
getdents(6, /* 0 entries */, 32768) = 0
close(6) = 0

It's not clear why it takes so long for xemacs to start -- it's native mount ext3 file-system. There's a regular emacs that reads the same init and el files and it starts as quickly as expected.

I get the same behavior from my own source compiled binary and with the bundled binary xemacs from the RPM -- xemacs-21.5.31-5.el6.x86_64.

Could there be something I'm missing from my .xemacs inits?

I'll continue to dig into this to see if I can pinpoint why it takes so long for it to start.... Well here's another oddity that I found using strace, but this looks like an X-11 thing:

poll([{fd=6, events=POLLIN}, {fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 2, 268) = 0 (Timeout)
read(6, 0x2a31634, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(6, 0x2a31634, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN}, {fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 2, 0) = 0 (Timeout)
read(6, 0x2a31634, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
read(6, 0x2a31634, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(6, 0x2a31634, 4096) = -1 EAGAIN (Resource temporarily unavailable)

Michael Sperber

unread,
Aug 24, 2012, 2:46:12 AM8/24/12
to jschu...@silvertailsystems.com

jschu...@silvertailsystems.com writes:

> It's more like 800 of these directory reads... and it appears that it reads every .el file in each package-directory as evidenced by this example strace:
> open("/usr/share/xemacs/mule-packages/lisp/egg-its/",
>
> O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6
> getdents(6, /* 54 entries */, 32768) = 1984
> getdents(6, /* 0 entries */, 32768) = 0
> close(6) = 0

Guys, I really need a more complete list of those 800 directories to
help. Feel free to e-mail me directly.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

Colin S. Miller

unread,
Sep 13, 2012, 3:31:49 PM9/13/12
to
On 23/08/12 21:52, jschu...@silvertailsystems.com wrote:
> On Monday, August 20, 2012 3:31:17 PM UTC-7, Zapatero wrote:
>> I downloaded and built xemacs-21.5.32 and built it with mostly default configuration settings on linux 2.6.32-131 using gcc 4.4.6.
>>
>>
>>
>> Everything is cool accept for start-up which is painfully slow (takes upwards of five minutes on a 24-core machine!).
>>
>> -z
<snip!>
>
> It's more like 800 of these directory reads... and it appears that it reads every .el file in each package-directory as evidenced by this example strace:
> open("/usr/share/xemacs/mule-packages/lisp/egg-its/",

It's loading the .el files, not the .elc?
Can you remember if the builder did a el compilation?
(I can't remember where this stage occurs, or what its actual name is)

And why is it loading all the packages, not just the autoloads?

HTH,
Colin S. Miller


>--
Replace the obvious in my email address with the first three letters of the hostname to reply.
0 new messages