Mailing List Archive

xemacs startup is slow
Xemacs startup is slow here. It just loads at normal speed from
the disk, then there is no disc activity and no cpu intensive
tasks for about 5 seconds, before xemacs opens the first window.
This also happens with the -vanilla command line option, so maybe
not caused by any lisp code loading.

Is this normal? What to do to get xemacs loading faster?

This is really the only annoyance for me when switching from
debian to gentoo, and I can't find any information on the net (to
many meaningless google results).

Any help would be appreciated.

Urs

--
gentoo-user@gentoo.org mailing list
Re: xemacs startup is slow [ In reply to ]
Urs Schuetz wrote:
> Xemacs startup is slow here. It just loads at normal speed from
> the disk, then there is no disc activity and no cpu intensive
> tasks for about 5 seconds, before xemacs opens the first window.
> This also happens with the -vanilla command line option, so maybe
> not caused by any lisp code loading.
>
> Is this normal? What to do to get xemacs loading faster?
>
> This is really the only annoyance for me when switching from
> debian to gentoo, and I can't find any information on the net (to
> many meaningless google results).
>
Did you try strace-ing?
strace -ttT -f xemacs &>xemacs.strace
<Ctrl+C> after it finishes loading,

### BEGIN stupidity
then this "one-liner" :-)

cat xemacs.trace |perl -e 'my $maxtime=1.0; sub diff{@a=@_;foreach(@a){m/(\d{2}):(\d{2}):(\d{2})\.(\d{6}).*/;$_=$1*3600+$2*60+$3+$4/1000000};return $a[0]-$a[1];}; my @prev=split(/ /,<>,2); while(<>){@R=split(/ /,$_,2);my $diff=diff($R[0],$prev[0]); print join(" ",@prev) unless ($diff<$maxtime); @prev=@R;}'

Well, I thought it is easy, but it turned out not to be, so I spend 10 minutes on that (yes, you might buy me a beer :-)
It will print the syscall that has been executing for more than one second (change $maxtime if you want).

On my system for $maxtime=0.1 I got:
00:26:34.019667 close(3) = 0 <0.000005>
00:26:35.052836 select(6, [5], NULL, NULL, NULL) = 1 (in [5]) <0.169313>
00:26:35.887698 select(6, [3 5], [], [], {6, 973390}) = 1 (in [5], left {6, 488000}) <0.486883>
00:26:36.375818 select(6, [3 5], [], [], {6, 485303}) = 1 (in [5], left {6, 364000}) <0.122005>
00:26:36.501267 select(6, [3 5], [], [], {0, 998229}) = 1 (in [5], left {0, 828000}) <0.170683>
00:26:36.713589 select(6, [3 5], [], [], {0, 785907}) = 1 (in [5], left {0, 596000}) <0.191086>

### END stupidity

Oh, god! Am I stupid... instead of that ugly code (I'll leave it for reference), try:

cat xemacs.strace |perl -ne 'm/<([0-9.]+)>/;print if ($1>0.3333333333)'

to see what took more than 0.3333333333 seconds to finish...

Cheers,
Kalin.

--
|| ~~~~~~~~~~~~~~~~~~~~~~ ||
( ) http://ThinRope.net/ ( )
|| ______________________ ||


--
gentoo-user@gentoo.org mailing list
Re: Re: xemacs startup is slow [ In reply to ]
On 00:33 Mon 25 Oct , Kalin KOZHUHAROV wrote:
> Urs Schuetz wrote:
> >Xemacs startup is slow here. It just loads at normal speed from
> >the disk, then there is no disc activity and no cpu intensive
> >tasks for about 5 seconds, before xemacs opens the first window.
> >This also happens with the -vanilla command line option, so maybe
> >not caused by any lisp code loading.
> >
> >Is this normal? What to do to get xemacs loading faster?
> >
> Did you try strace-ing?
> strace -ttT -f xemacs &>xemacs.strace
> <Ctrl+C> after it finishes loading,
>
>
> Oh, god! Am I stupid... instead of that ugly code (I'll leave it for
> reference), try:
>
> cat xemacs.strace |perl -ne 'm/<([0-9.]+)>/;print if ($1>0.3333333333)'
>
> to see what took more than 0.3333333333 seconds to finish...
>

Thanks for the work. Here is what I get, longer then 1 second:
19:37:25.045625 nanosleep({1, 0}, {1, 0}) = 0 <1.001754>
19:37:26.048079 nanosleep({1, 0}, {1, 0}) = 0 <1.001145>
19:37:27.049904 nanosleep({1, 0}, {1, 0}) = 0 <1.001167>
19:37:28.051875 nanosleep({1, 0}, {1, 0}) = 0 <1.001154>
19:37:29.053718 nanosleep({1, 0}, {1, 0}) = 0 <1.001047>
19:37:31.369180 select(6, [3 5], [], [], {6, 854870}) = 1 (in [5], left {5, 493000}) <1.362099>
19:37:32.731546 --- SIGIO (I/O possible) @ 0 (0) ---

Urs

--
gentoo-user@gentoo.org mailing list
Re: Re: xemacs startup is slow [ In reply to ]
Urs Schuetz wrote:

> On 00:33 Mon 25 Oct , Kalin KOZHUHAROV wrote:
>> Urs Schuetz wrote:
>> >Xemacs startup is slow here. It just loads at normal speed from
>> >the disk, then there is no disc activity and no cpu intensive
>> >tasks for about 5 seconds, before xemacs opens the first window.
>> >This also happens with the -vanilla command line option, so maybe
>> >not caused by any lisp code loading.
>> >
>> >Is this normal? What to do to get xemacs loading faster?

1. Try to boot xemacs without .xemacs config file - may be the problem
with modules you load? In my own case I found that using color-theme.el
seriously slowed startup time (because its big file, even compiling it
did not help much), so I had to flush colors by color-theme-x
to .Xresources.

2. In fact, I did not used Xemacs to load everytime. I really like the idea
of 'gnuclient'. It gives so good speed that what I did is loading Xemacs
once at beginning of my work, and then, loading new windows via
'gnuclient'. I get incrediable speed this way.

Alex




--
gentoo-user@gentoo.org mailing list
Re: Re: Re: xemacs startup is slow [ In reply to ]
On 08:49 Mon 25 Oct , Alex V. Koval wrote:
>Urs Schuetz wrote:
>
>>On 00:33 Mon 25 Oct , Kalin KOZHUHAROV wrote:
>>>Urs Schuetz wrote:
>>>>Xemacs startup is slow here. It just loads at normal speed from
>>>>the disk, then there is no disc activity and no cpu intensive
>>>>tasks for about 5 seconds, before xemacs opens the first window.
>>>>This also happens with the -vanilla command line option, so maybe
>>>>not caused by any lisp code loading.
>>>>
>>>>Is this normal? What to do to get xemacs loading faster?
>
>1. Try to boot xemacs without .xemacs config file - may be the problem
> with modules you load? In my own case I found that using color-theme.el
> seriously slowed startup time (because its big file, even compiling it
> did not help much), so I had to flush colors by color-theme-x
> to .Xresources.

Yes, I did by using -vanilla option. Did not change anything.

>2. In fact, I did not used Xemacs to load everytime. I really like the idea
> of 'gnuclient'. It gives so good speed that what I did is loading Xemacs
> once at beginning of my work, and then, loading new windows via
> 'gnuclient'. I get incrediable speed this way.

I will try this, thanks.

I just found out that xemacs is loading in the console (alt+F1)
within 0.3 seconds, and if I use the --no-windows option under
Xorg I get the same fast loading. So there seems to be a problem
of interaction of X and xemacs, I will search further...

Thanks
Urs

--
gentoo-user@gentoo.org mailing list