unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Gnu Emacs way slower than XEmacs
@ 2003-04-22 11:43 David Abrahams
  2003-04-22 12:33 ` Miles Bader
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-22 11:43 UTC (permalink / raw)



Now that I've got your attention, I should qualify that.  On Windows
XP using GNUs and talking to an IMAP server, it's way faster to use
XEmacs than to use Gnu Emacs.  Nobody over on the GNUs list has a clue
as to why, but since they just work on elisp code they surmise it's
something in the emacs implementation.  I know it's a long shot, but I
thought someone over here should know about it.

Cheers,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 11:43 Gnu Emacs way slower than XEmacs David Abrahams
@ 2003-04-22 12:33 ` Miles Bader
  2003-04-22 14:15   ` David Abrahams
  2003-04-22 13:19 ` Stephen J. Turnbull
  2003-04-22 13:27 ` Frank Schmitt
  2 siblings, 1 reply; 35+ messages in thread
From: Miles Bader @ 2003-04-22 12:33 UTC (permalink / raw)
  Cc: emacs-devel

On Tue, Apr 22, 2003 at 07:43:59AM -0400, David Abrahams wrote:
> Now that I've got your attention, I should qualify that.  On Windows
> XP using GNUs and talking to an IMAP server, it's way faster to use
> XEmacs than to use Gnu Emacs.  Nobody over on the GNUs list has a clue
> as to why, but since they just work on elisp code they surmise it's
> something in the emacs implementation.

Um, it might help if you actually said what operation is slower....

-Miles
-- 
"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 11:43 Gnu Emacs way slower than XEmacs David Abrahams
  2003-04-22 12:33 ` Miles Bader
@ 2003-04-22 13:19 ` Stephen J. Turnbull
  2003-04-22 14:17   ` David Abrahams
                     ` (2 more replies)
  2003-04-22 13:27 ` Frank Schmitt
  2 siblings, 3 replies; 35+ messages in thread
From: Stephen J. Turnbull @ 2003-04-22 13:19 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:

    David> Now that I've got your attention, I should qualify that.
    David> On Windows XP using GNUs and talking to an IMAP server,
    David> it's way faster to use XEmacs than to use Gnu Emacs.

Which version of XEmacs?  Up until very recently, things could be very
slow because of a bug in our process code which caused a hang on large
network operations.  If that sounds like a possibility, I'll find the
patch.  (I think it was by Daiki Ueno, it simply set the pipe to
non-blocking.)  I don't think this code was ever part of GNU Emacs,
but there's some possibility of independent invention.  ;-)

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 11:43 Gnu Emacs way slower than XEmacs David Abrahams
  2003-04-22 12:33 ` Miles Bader
  2003-04-22 13:19 ` Stephen J. Turnbull
@ 2003-04-22 13:27 ` Frank Schmitt
  2003-04-23 12:18   ` David Abrahams
  2 siblings, 1 reply; 35+ messages in thread
From: Frank Schmitt @ 2003-04-22 13:27 UTC (permalink / raw)


David Abrahams <dave@boost-consulting.com> writes:

> Now that I've got your attention, I should qualify that.  On Windows
> XP using GNUs and talking to an IMAP server, it's way faster to use
> XEmacs than to use Gnu Emacs.  Nobody over on the GNUs list has a clue
> as to why, but since they just work on elisp code they surmise it's
> something in the emacs implementation.  I know it's a long shot, but I
> thought someone over here should know about it.

Well, for me Gnus' general performance (mainly building summary buffers
(nntp and nnml)) is much better under GNU Emacs than under XEmacs (also
MS Windows).

-- 
"You know the world is going crazy when the best rapper is a white guy,
the best golfer is a black guy, the Swiss hold the America's Cup, France
is accusing the US of arrogance, and Germany doesn't want to go to war."
          -- Unknown author

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 12:33 ` Miles Bader
@ 2003-04-22 14:15   ` David Abrahams
  2003-04-22 15:09     ` Miles Bader
  0 siblings, 1 reply; 35+ messages in thread
From: David Abrahams @ 2003-04-22 14:15 UTC (permalink / raw)


Miles Bader <miles@gnu.org> writes:

Miles Bader <miles@gnu.org> writes:

> On Tue, Apr 22, 2003 at 07:43:59AM -0400, David Abrahams wrote:
>> Now that I've got your attention, I should qualify that.  On Windows
>> XP using GNUs and talking to an IMAP server, it's way faster to use
>> XEmacs than to use Gnu Emacs.  Nobody over on the GNUs list has a clue
>> as to why, but since they just work on elisp code they surmise it's
>> something in the emacs implementation.
>
> Um, it might help if you actually said what operation is slower....

Almost anything.  `M-g' to get new message headers is one example, but
downloading a large message (with, say, a several-megabyte
attachment), shows a really remarkable difference in speed.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 13:19 ` Stephen J. Turnbull
@ 2003-04-22 14:17   ` David Abrahams
  2003-04-23  9:37     ` Eli Zaretskii
  2003-04-22 18:30   ` Kai Großjohann
  2003-04-22 20:19   ` Jason Rumney
  2 siblings, 1 reply; 35+ messages in thread
From: David Abrahams @ 2003-04-22 14:17 UTC (permalink / raw)


"Stephen J. Turnbull" <stephen@xemacs.org> writes:

>>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>
>     David> Now that I've got your attention, I should qualify that.
>     David> On Windows XP using GNUs and talking to an IMAP server,
>     David> it's way faster to use XEmacs than to use Gnu Emacs.
>
> Which version of XEmacs?  

The very latest I could download a few days ago.

> Up until very recently, things could be very slow because of a bug
> in our process code which caused a hang on large network operations.

It didn't *look* like a hang from this end, but if the hang was short
enough it might've been one.

> If that sounds like a possibility, I'll find the patch.  (I think it
> was by Daiki Ueno, it simply set the pipe to non-blocking.)  I don't
> think this code was ever part of GNU Emacs, but there's some
> possibility of independent invention.  ;-)

Oh, that sounds like it might be a possibility.  Worth looking at, for
sure.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 14:15   ` David Abrahams
@ 2003-04-22 15:09     ` Miles Bader
  2003-04-22 16:03       ` David Abrahams
  0 siblings, 1 reply; 35+ messages in thread
From: Miles Bader @ 2003-04-22 15:09 UTC (permalink / raw)
  Cc: emacs-devel

On Tue, Apr 22, 2003 at 10:15:05AM -0400, David Abrahams wrote:
> > Um, it might help if you actually said what operation is slower....
> 
> Almost anything.  `M-g' to get new message headers is one example, but
> downloading a large message (with, say, a several-megabyte
> attachment), shows a really remarkable difference in speed.

Almost anything, like C-f, C-n, and M-x hanoi?

At least in this message you gave an example -- M-g (I assume in a gnus
summary buffer) -- but even that is very vague.  Is it only with imap (as you
previously implied)?  Does it happen with local (file) mailboxes too?  Pop3?

If you want to report a bug, please give specific examples, with lots of
details!  What may be obvious to you isn't necessarily obvious to the rest of
us; see the info node `(emacs)Bugs'.

-Miles
-- 
I have seen the enemy, and he is us.  -- Pogo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 15:09     ` Miles Bader
@ 2003-04-22 16:03       ` David Abrahams
  2003-04-22 18:32         ` Kai Großjohann
  2003-04-23  1:39         ` Miles Bader
  0 siblings, 2 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-22 16:03 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader <miles@gnu.org> writes:

> On Tue, Apr 22, 2003 at 10:15:05AM -0400, David Abrahams wrote:
>> > Um, it might help if you actually said what operation is slower....
>> 
>> Almost anything.  `M-g' to get new message headers is one example, but
>> downloading a large message (with, say, a several-megabyte
>> attachment), shows a really remarkable difference in speed.
>
> Almost anything, like C-f, C-n, and M-x hanoi?

No, almost anything that involves talking to the IMAP server.  I'm
sorry, I thought that was obvious from my previous post, but I see now
that it wasn't.

> At least in this message you gave an example -- M-g (I assume in a gnus
> summary buffer) -- but even that is very vague.  Is it only with imap (as you
> previously implied)?  

Yes.

> Does it happen with local (file) mailboxes too?  Pop3?

No.

> If you want to report a bug, please give specific examples, with
> lots of details!  

It's hard to gather much detail on this one.  What more would you like.

> What may be obvious to you isn't necessarily
> obvious to the rest of us; see the info node `(emacs)Bugs'.

Believe it or not, I'm familiar with good bug reporting practice.  The
problem is that I don't know whether anyone's interested in looking at
it and I feel that I can't give much detail about the problem.  I can
say that it's been reproduced by others, though.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 13:19 ` Stephen J. Turnbull
  2003-04-22 14:17   ` David Abrahams
@ 2003-04-22 18:30   ` Kai Großjohann
  2003-04-22 20:17     ` Jason Rumney
  2003-04-22 20:19   ` Jason Rumney
  2 siblings, 1 reply; 35+ messages in thread
From: Kai Großjohann @ 2003-04-22 18:30 UTC (permalink / raw)


"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> Which version of XEmacs?  Up until very recently, things could be very
> slow because of a bug in our process code which caused a hang on large
> network operations.

Note that David is reporting that XEmacs is *faster* than Emacs.

A bug in the XEmacs process code causing a slowdown is unlikely to
explain this ;-)
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 16:03       ` David Abrahams
@ 2003-04-22 18:32         ` Kai Großjohann
  2003-04-23 12:19           ` David Abrahams
  2003-04-23  1:39         ` Miles Bader
  1 sibling, 1 reply; 35+ messages in thread
From: Kai Großjohann @ 2003-04-22 18:32 UTC (permalink / raw)


David Abrahams <dave@boost-consulting.com> writes:

> Believe it or not, I'm familiar with good bug reporting practice.  The
> problem is that I don't know whether anyone's interested in looking at
> it and I feel that I can't give much detail about the problem.  I can
> say that it's been reproduced by others, though.

Hm.  Could you go down a bit to a lower level?  For example, Gnus
invokes nnimap on IMAP groups, which in turn invokes imap.el to do
the actual network communication.

Maybe you can devise a sequence of function calls from imap.el that
show the slowness?

Are you talking SSL with your IMAP server?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 18:30   ` Kai Großjohann
@ 2003-04-22 20:17     ` Jason Rumney
  2003-04-23  2:55       ` Stephen J. Turnbull
  0 siblings, 1 reply; 35+ messages in thread
From: Jason Rumney @ 2003-04-22 20:17 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
> 
> > Which version of XEmacs?  Up until very recently, things could be very
> > slow because of a bug in our process code which caused a hang on large
> > network operations.
> 
> Note that David is reporting that XEmacs is *faster* than Emacs.
> 
> A bug in the XEmacs process code causing a slowdown is unlikely to
> explain this ;-)

Stephen is suggesting that the same bug that was fixed in XEmacs
might be present in GNU Emacs.

Does XEmacs implement non-blocking sockets on Windows?  Some parts of
Gnus use async network I/O where possible, so that might make things
appear faster even if they weren't. Since we force Windows sockets
to look like file handles in Emacs, implementing select() properly for
sockets without breaking async process I/O is difficult. I might have
another go at it one day.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 13:19 ` Stephen J. Turnbull
  2003-04-22 14:17   ` David Abrahams
  2003-04-22 18:30   ` Kai Großjohann
@ 2003-04-22 20:19   ` Jason Rumney
  2003-04-22 21:21     ` David Abrahams
  2 siblings, 1 reply; 35+ messages in thread
From: Jason Rumney @ 2003-04-22 20:19 UTC (permalink / raw)
  Cc: emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> >>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
> 
>     David> Now that I've got your attention, I should qualify that.
>     David> On Windows XP using GNUs and talking to an IMAP server,
>     David> it's way faster to use XEmacs than to use Gnu Emacs.
> 
> Which version of XEmacs?

And which version of GNU Emacs?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 20:19   ` Jason Rumney
@ 2003-04-22 21:21     ` David Abrahams
  0 siblings, 0 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-22 21:21 UTC (permalink / raw)
  Cc: emacs-devel

Jason Rumney <jasonr@gnu.org> writes:

> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>
>> >>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>> 
>>     David> Now that I've got your attention, I should qualify that.
>>     David> On Windows XP using GNUs and talking to an IMAP server,
>>     David> it's way faster to use XEmacs than to use Gnu Emacs.
>> 
>> Which version of XEmacs?
>
> And which version of GNU Emacs?

A CVS snapshot from March 21

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 16:03       ` David Abrahams
  2003-04-22 18:32         ` Kai Großjohann
@ 2003-04-23  1:39         ` Miles Bader
  1 sibling, 0 replies; 35+ messages in thread
From: Miles Bader @ 2003-04-23  1:39 UTC (permalink / raw)
  Cc: emacs-devel

David Abrahams <dave@boost-consulting.com> writes:
> Believe it or not, I'm familiar with good bug reporting practice.  The
> problem is that I don't know whether anyone's interested in looking at
> it and I feel that I can't give much detail about the problem.

I think the problem is that you've been discussing this with others, so
the context is clear to you, but you sent your message cold to
emacs-devel, so we don't have any of that context.

-Miles
-- 
Occam's razor split hairs so well, I bought the whole argument!

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 20:17     ` Jason Rumney
@ 2003-04-23  2:55       ` Stephen J. Turnbull
  2003-04-23  6:43         ` Jason Rumney
  0 siblings, 1 reply; 35+ messages in thread
From: Stephen J. Turnbull @ 2003-04-23  2:55 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "Jason" == Jason Rumney <jasonr@gnu.org> writes:

    Jason> Does XEmacs implement non-blocking sockets on Windows?

I don't know.  Ask Ben Wing <ben@xemacs.org>.  I know he's done a lot
of work on processes, much of it intended to make processes work
efficiently on Windows within the Unix-centric context of the rest of
XEmacs.  He may have done so; I'm sure it would be high on his
priority list.

Windows is not my pidgen, but if Ben doesn't answer (I know he's way
behind on his mail right now; medical problems that affect his hands
the way RSI does make it unlikely that he'll catch up soon), I'll be
happy to take a hack at grokking the relevant code if you feel for
copyright reasons it would be better if you don't look at it
personally.  Alternatively, you can probably get his phone number from
his web page www.666.com (or from me personally).  He's quite
accessible by phone (evenings, US Mountain Time).


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23  2:55       ` Stephen J. Turnbull
@ 2003-04-23  6:43         ` Jason Rumney
  2003-04-23  9:36           ` Eli Zaretskii
  2003-04-26  2:41           ` Ben Wing
  0 siblings, 2 replies; 35+ messages in thread
From: Jason Rumney @ 2003-04-23  6:43 UTC (permalink / raw)
  Cc: emacs-devel


Hi Ben, can you answer the following question for me?
A simple yes or no is sufficient, we are trying to determine whether
there is a simple explanation for XEmacs being noticeably faster than
GNU Emacs for network operations on Windows, or if it is due to a bug
in GNU Emacs.


"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> >>>>> "Jason" == Jason Rumney <jasonr@gnu.org> writes:
> 
>     Jason> Does XEmacs implement non-blocking sockets on Windows?
> 
> I don't know.  Ask Ben Wing <ben@xemacs.org>.  I know he's done a lot
> of work on processes, much of it intended to make processes work
> efficiently on Windows within the Unix-centric context of the rest of
> XEmacs.  He may have done so; I'm sure it would be high on his
> priority list.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23  6:43         ` Jason Rumney
@ 2003-04-23  9:36           ` Eli Zaretskii
  2003-04-23 12:21             ` David Abrahams
  2003-04-26  2:41           ` Ben Wing
  1 sibling, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2003-04-23  9:36 UTC (permalink / raw)
  Cc: emacs-devel

> From: Jason Rumney <jasonr@gnu.org>
> Date: 23 Apr 2003 07:43:02 +0100
> 
> A simple yes or no is sufficient, we are trying to determine whether
> there is a simple explanation for XEmacs being noticeably faster than
> GNU Emacs for network operations on Windows, or if it is due to a bug
> in GNU Emacs.

Another relevant piece of information is whether the Windows build of
XEmacs is a native build or a Cygwin build.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 14:17   ` David Abrahams
@ 2003-04-23  9:37     ` Eli Zaretskii
  2003-04-23 10:37       ` David Abrahams
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2003-04-23  9:37 UTC (permalink / raw)
  Cc: emacs-devel

> From: David Abrahams <dave@boost-consulting.com>
> Date: Tue, 22 Apr 2003 10:17:02 -0400
> 
> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
> 
> >>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
> >
> >     David> Now that I've got your attention, I should qualify that.
> >     David> On Windows XP using GNUs and talking to an IMAP server,
> >     David> it's way faster to use XEmacs than to use Gnu Emacs.
> >
> > Which version of XEmacs?  
> 
> The very latest I could download a few days ago.

Was that a Cygwin build or a native Windows build?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23  9:37     ` Eli Zaretskii
@ 2003-04-23 10:37       ` David Abrahams
  2003-04-23 10:38         ` David Abrahams
  0 siblings, 1 reply; 35+ messages in thread
From: David Abrahams @ 2003-04-23 10:37 UTC (permalink / raw)
  Cc: emacs-devel

"Eli Zaretskii" <eliz@elta.co.il> writes:

>> From: David Abrahams <dave@boost-consulting.com>
>> Date: Tue, 22 Apr 2003 10:17:02 -0400
>> 
>> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>> 
>> >>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>> >
>> >     David> Now that I've got your attention, I should qualify that.
>> >     David> On Windows XP using GNUs and talking to an IMAP server,
>> >     David> it's way faster to use XEmacs than to use Gnu Emacs.
>> >
>> > Which version of XEmacs?  
>> 
>> The very latest I could download a few days ago.
>
> Was that a Cygwin build or a native Windows build?

Native.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 10:37       ` David Abrahams
@ 2003-04-23 10:38         ` David Abrahams
  0 siblings, 0 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-23 10:38 UTC (permalink / raw)
  Cc: emacs-devel

David Abrahams <dave@boost-consulting.com> writes:

> "Eli Zaretskii" <eliz@elta.co.il> writes:
>
>>> From: David Abrahams <dave@boost-consulting.com>
>>> Date: Tue, 22 Apr 2003 10:17:02 -0400
>>> 
>>> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>>> 
>>> >>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>>> >
>>> >     David> Now that I've got your attention, I should qualify that.
>>> >     David> On Windows XP using GNUs and talking to an IMAP server,
>>> >     David> it's way faster to use XEmacs than to use Gnu Emacs.
>>> >
>>> > Which version of XEmacs?  
>>> 
>>> The very latest I could download a few days ago.
>>
>> Was that a Cygwin build or a native Windows build?
>
> Native.

Uh, whoops!  The XEmacs is Cygwin; my GNU Emacs is native.
(sorry)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 13:27 ` Frank Schmitt
@ 2003-04-23 12:18   ` David Abrahams
  0 siblings, 0 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-23 12:18 UTC (permalink / raw)


Frank Schmitt <ich@Frank-Schmitt.net> writes:

> David Abrahams <dave@boost-consulting.com> writes:
>
>> Now that I've got your attention, I should qualify that.  On Windows
>> XP using GNUs and talking to an IMAP server, it's way faster to use
>> XEmacs than to use Gnu Emacs.  Nobody over on the GNUs list has a clue
>> as to why, but since they just work on elisp code they surmise it's
>> something in the emacs implementation.  I know it's a long shot, but I
>> thought someone over here should know about it.
>
> Well, for me Gnus' general performance (mainly building summary buffers
> (nntp and nnml)) is much better under GNU Emacs than under XEmacs (also
> MS Windows).

I think I'm seeing something similar.  My complaint with GNU Emacs
only applies to "almost anything" having to do IMAP transactions over
SSL.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-22 18:32         ` Kai Großjohann
@ 2003-04-23 12:19           ` David Abrahams
  2003-04-23 14:08             ` Kai Großjohann
  2003-04-23 18:40             ` Eli Zaretskii
  0 siblings, 2 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-23 12:19 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> David Abrahams <dave@boost-consulting.com> writes:
>
>> Believe it or not, I'm familiar with good bug reporting practice.  The
>> problem is that I don't know whether anyone's interested in looking at
>> it and I feel that I can't give much detail about the problem.  I can
>> say that it's been reproduced by others, though.
>
> Hm.  Could you go down a bit to a lower level?  For example, Gnus
> invokes nnimap on IMAP groups, which in turn invokes imap.el to do
> the actual network communication.
>
> Maybe you can devise a sequence of function calls from imap.el that
> show the slowness?

That's a bit beyond me.  To really see it in a conclusive way, you
need to download a message with a large attachment.

> Are you talking SSL with your IMAP server?

Yes indeed.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23  9:36           ` Eli Zaretskii
@ 2003-04-23 12:21             ` David Abrahams
  2003-04-23 18:41               ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: David Abrahams @ 2003-04-23 12:21 UTC (permalink / raw)


"Eli Zaretskii" <eliz@elta.co.il> writes:

>> From: Jason Rumney <jasonr@gnu.org>
>> Date: 23 Apr 2003 07:43:02 +0100
>> 
>> A simple yes or no is sufficient, we are trying to determine whether
>> there is a simple explanation for XEmacs being noticeably faster than
>> GNU Emacs for network operations on Windows, or if it is due to a bug
>> in GNU Emacs.
>
> Another relevant piece of information is whether the Windows build of
> XEmacs is a native build or a Cygwin build.

I see roughly the same snappiness from IMAP with either build of XEmacs.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 12:19           ` David Abrahams
@ 2003-04-23 14:08             ` Kai Großjohann
  2003-04-23 18:40             ` Eli Zaretskii
  1 sibling, 0 replies; 35+ messages in thread
From: Kai Großjohann @ 2003-04-23 14:08 UTC (permalink / raw)


David Abrahams <dave@boost-consulting.com> writes:

> That's a bit beyond me.  To really see it in a conclusive way, you
> need to download a message with a large attachment.

Yes.  You could set imap-debug and/or imap-log.  That will produce
buffers *imap-debug* and/or *imap-log*, and one of them shows the
Lisp calls made.

Maybe you can extract the Lisp calls from there?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 12:19           ` David Abrahams
  2003-04-23 14:08             ` Kai Großjohann
@ 2003-04-23 18:40             ` Eli Zaretskii
  2003-04-23 23:52               ` David Abrahams
  1 sibling, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2003-04-23 18:40 UTC (permalink / raw)
  Cc: emacs-devel

> From: David Abrahams <dave@boost-consulting.com>
> Date: Wed, 23 Apr 2003 08:19:56 -0400
> >
> > Maybe you can devise a sequence of function calls from imap.el that
> > show the slowness?
> 
> That's a bit beyond me.  To really see it in a conclusive way, you
> need to download a message with a large attachment.

Then how about profiling the lengthy operation?  See the instructions
in elp.el for more details.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 12:21             ` David Abrahams
@ 2003-04-23 18:41               ` Eli Zaretskii
  0 siblings, 0 replies; 35+ messages in thread
From: Eli Zaretskii @ 2003-04-23 18:41 UTC (permalink / raw)
  Cc: emacs-devel

> From: David Abrahams <dave@boost-consulting.com>
> Date: Wed, 23 Apr 2003 08:21:45 -0400
> >
> > Another relevant piece of information is whether the Windows build of
> > XEmacs is a native build or a Cygwin build.
> 
> I see roughly the same snappiness from IMAP with either build of XEmacs.

Then it probably isn't due to subprocess code, that is, I imagine,
very different in the two builds of XEmacs.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 18:40             ` Eli Zaretskii
@ 2003-04-23 23:52               ` David Abrahams
  2003-04-24  7:26                 ` Stephen J. Turnbull
  2003-04-24  7:36                 ` Kai Großjohann
  0 siblings, 2 replies; 35+ messages in thread
From: David Abrahams @ 2003-04-23 23:52 UTC (permalink / raw)
  Cc: emacs-devel

"Eli Zaretskii" <eliz@elta.co.il> writes:

> Then how about profiling the lengthy operation?  See the instructions
> in elp.el for more details.

OK, the results are posted here:

  http://users.rcn.com/abrahams/elp/

I enabled profiling for gnus-*, imap-*, and nnimap-*.

When I watched my network throughput, Gnu Emacs' looked like:

   __/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__/\__

and XEmacs' looked like

         /\/\/\/\   
         |       |
     ___/        \_____

(roughly speaking).

Thanks for looking at this.  


P.S. If it's any consolation, GNU Emacs is *WAY* faster than XEmacs at
sending mail to the SMTP server ;-)

-Dave
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 23:52               ` David Abrahams
@ 2003-04-24  7:26                 ` Stephen J. Turnbull
  2003-04-24 13:17                   ` Simon Josefsson
  2003-04-24  7:36                 ` Kai Großjohann
  1 sibling, 1 reply; 35+ messages in thread
From: Stephen J. Turnbull @ 2003-04-24  7:26 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:

    David> P.S. If it's any consolation, GNU Emacs is *WAY* faster
    David> than XEmacs at sending mail to the SMTP server ;-)

Right.  That's because traditionally we assumed that sendmail always
worked and used an asynchronous process.  Then we started having
people use less reliable software (eg, beta versions of TMDA) and
losing mail.  So now we wait on the return code.  Perhaps this could
be tweaked a bit, or made user-configurable, but we were in a hurry to
get it right at the time; losing mail is a no-no.


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23 23:52               ` David Abrahams
  2003-04-24  7:26                 ` Stephen J. Turnbull
@ 2003-04-24  7:36                 ` Kai Großjohann
  2003-04-24 20:22                   ` Eli Zaretskii
  1 sibling, 1 reply; 35+ messages in thread
From: Kai Großjohann @ 2003-04-24  7:36 UTC (permalink / raw)


David Abrahams <dave@boost-consulting.com> writes:

> "Eli Zaretskii" <eliz@elta.co.il> writes:
>
>> Then how about profiling the lengthy operation?  See the instructions
>> in elp.el for more details.
>
> OK, the results are posted here:
>
>   http://users.rcn.com/abrahams/elp/
>
> I enabled profiling for gnus-*, imap-*, and nnimap-*.

Okay, it seems in both cases the function that takes long is
imap-wait-for-tag.  But in XEmacs it's much faster.

Could you do the following?

M-x find-function RET imap-wait-for-tag RET
C-n C-n         (move down a bit, not important how much)
M-x edebug-defun RET

Now invoke the same operation again that you invoked for the
profiles.  Emacs should show you the imap.el buffer with an arrow
indicating the current line.  Then you can use SPC to step through.

I'm guessing that the long delay will be in the call to
accept-process-output, and that this delay will be shorter in XEmacs
than in Emacs.

If that's really the case, then, indeed, it's the subprocess and
network I/O operations that need to be tweaked.

Hm.  I browsed the C source but didn't see anything there that's
obviously specific to Windows.  So I don't really have an idea what
to do if my conjecture is right.  But this was the first time I ever
looked at that code, and I'm no networking wizard, so I'm sure others
will have better ideas.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-24  7:26                 ` Stephen J. Turnbull
@ 2003-04-24 13:17                   ` Simon Josefsson
  2003-04-24 14:36                     ` David Abrahams
  0 siblings, 1 reply; 35+ messages in thread
From: Simon Josefsson @ 2003-04-24 13:17 UTC (permalink / raw)
  Cc: emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

>>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>
>     David> P.S. If it's any consolation, GNU Emacs is *WAY* faster
>     David> than XEmacs at sending mail to the SMTP server ;-)
>
> Right.  That's because traditionally we assumed that sendmail always
> worked and used an asynchronous process.  Then we started having
> people use less reliable software (eg, beta versions of TMDA) and
> losing mail.  So now we wait on the return code.  Perhaps this could
> be tweaked a bit, or made user-configurable, but we were in a hurry to
> get it right at the time; losing mail is a no-no.

It's not clear if "sending mail" means sendmail or smtpmail -- David?
I think the return code problem was reported simultaneous to (X)Emacs.
Emacs has checked the exit code since 1998, for XEmacs definitely
since 2001 when sendmail.el was synced, but maybe also between 1998
and 1999 if the ChangeLog is to be trusted (cvs seems down so I can't
look at the code).

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-24 13:17                   ` Simon Josefsson
@ 2003-04-24 14:36                     ` David Abrahams
  2003-04-24 14:58                       ` Simon Josefsson
  0 siblings, 1 reply; 35+ messages in thread
From: David Abrahams @ 2003-04-24 14:36 UTC (permalink / raw)
  Cc: emacs-devel

Simon Josefsson <jas@extundo.com> writes:

> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>
>>>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>>
>>     David> P.S. If it's any consolation, GNU Emacs is *WAY* faster
>>     David> than XEmacs at sending mail to the SMTP server ;-)
>>
>> Right.  That's because traditionally we assumed that sendmail always
>> worked and used an asynchronous process.  Then we started having
>> people use less reliable software (eg, beta versions of TMDA) and
>> losing mail.  So now we wait on the return code.  Perhaps this could
>> be tweaked a bit, or made user-configurable, but we were in a hurry to
>> get it right at the time; losing mail is a no-no.
>
> It's not clear if "sending mail" means sendmail or smtpmail --
> David?

I'm using smtpmail.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-24 14:36                     ` David Abrahams
@ 2003-04-24 14:58                       ` Simon Josefsson
  0 siblings, 0 replies; 35+ messages in thread
From: Simon Josefsson @ 2003-04-24 14:58 UTC (permalink / raw)
  Cc: emacs-devel

David Abrahams <dave@boost-consulting.com> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>>
>>>>>>>> "David" == David Abrahams <dave@boost-consulting.com> writes:
>>>
>>>     David> P.S. If it's any consolation, GNU Emacs is *WAY* faster
>>>     David> than XEmacs at sending mail to the SMTP server ;-)
>>>
>>> Right.  That's because traditionally we assumed that sendmail always
>>> worked and used an asynchronous process.  Then we started having
>>> people use less reliable software (eg, beta versions of TMDA) and
>>> losing mail.  So now we wait on the return code.  Perhaps this could
>>> be tweaked a bit, or made user-configurable, but we were in a hurry to
>>> get it right at the time; losing mail is a no-no.
>>
>> It's not clear if "sending mail" means sendmail or smtpmail --
>> David?
>
> I'm using smtpmail.

Then it doesn't use sendmail at all.  But it is weird -- smtpmail uses
network communication, just like imap.el.  One would think that if one
of the packages were fast, the other would too, instead of them being
negatively correlated.

IIRC smtpmail.el sends its output line-by-line whereas imap.el sends
as large chunks as possible.  Imap.el uses a process filter though,
which smtpmail.el doesn't.

Instead of speculating more, I'll leave it to someone who can debug
this further (I think a Windows machine is required for that...).

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-24  7:36                 ` Kai Großjohann
@ 2003-04-24 20:22                   ` Eli Zaretskii
  2003-04-24 20:56                     ` Kai Großjohann
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2003-04-24 20:22 UTC (permalink / raw)
  Cc: emacs-devel

> From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=)
> Date: Thu, 24 Apr 2003 09:36:45 +0200
> 
> I'm guessing that the long delay will be in the call to
> accept-process-output, and that this delay will be shorter in XEmacs
> than in Emacs.
> 
> If that's really the case, then, indeed, it's the subprocess and
> network I/O operations that need to be tweaked.

Since the OP reports that both Cygwin and native Windows builds of
XEmacs are similarly speedy, it sounds improbable that subprocess I/O
is involved.

But that's a speculation; some digging is needed here.

> Hm.  I browsed the C source but didn't see anything there that's
> obviously specific to Windows.

Perhaps src/w32proc.c will help to see that ;-)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-24 20:22                   ` Eli Zaretskii
@ 2003-04-24 20:56                     ` Kai Großjohann
  0 siblings, 0 replies; 35+ messages in thread
From: Kai Großjohann @ 2003-04-24 20:56 UTC (permalink / raw)


"Eli Zaretskii" <eliz@elta.co.il> writes:

>> From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=)
>> Date: Thu, 24 Apr 2003 09:36:45 +0200
>> 
>> Hm.  I browsed the C source but didn't see anything there that's
>> obviously specific to Windows.
>
> Perhaps src/w32proc.c will help to see that ;-)

Whoops.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: Gnu Emacs way slower than XEmacs
  2003-04-23  6:43         ` Jason Rumney
  2003-04-23  9:36           ` Eli Zaretskii
@ 2003-04-26  2:41           ` Ben Wing
  1 sibling, 0 replies; 35+ messages in thread
From: Ben Wing @ 2003-04-26  2:41 UTC (permalink / raw)
  Cc: emacs-devel

actually it was kirill katsnelson who did most of the work on processes and
networks, although i [a] scrapped the synchronous process stuff and rewrote it
using async, [b] added the abstracted stream interface.

but basically, the old gnu emacs way involved trying to simulate select[] and
other unix operations using windows, ala cygwin.  kirill scrapped all of the
process and network code for both windows and unix and rewrote it using an
abstraction layer that obviated the need to play games.  it doesn't look like
this has changed significantly in recent gnu emacsen.  there is no obvious
reason why emulation *has* to be slower, but in practice it often gets that way
because [a] the low-level code sometimes does unnecessary things to make the
emulation work., [b] it is hard to sort out what's really going on, and hence
[c] people are reluctant to make real changes.  as it is, i have seen a few
patches come into xemacs over the years from random contributors to speed up the
process/network code by putting a sleep or yield or buffering change or whatever
in certain critical places, and it seems less likely these would have appeared
without the clean abstracted design.

we do use async i/o with winsock.

ben

----- Original Message -----
From: "Jason Rumney" <jasonr@gnu.org>
To: <ben@xemacs.org>
Cc: <emacs-devel@gnu.org>
Sent: Tuesday, April 22, 2003 11:43 PM
Subject: Re: Gnu Emacs way slower than XEmacs


>
> Hi Ben, can you answer the following question for me?
> A simple yes or no is sufficient, we are trying to determine whether
> there is a simple explanation for XEmacs being noticeably faster than
> GNU Emacs for network operations on Windows, or if it is due to a bug
> in GNU Emacs.
>
>
> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>
> > >>>>> "Jason" == Jason Rumney <jasonr@gnu.org> writes:
> >
> >     Jason> Does XEmacs implement non-blocking sockets on Windows?
> >
> > I don't know.  Ask Ben Wing <ben@xemacs.org>.  I know he's done a lot
> > of work on processes, much of it intended to make processes work
> > efficiently on Windows within the Unix-centric context of the rest of
> > XEmacs.  He may have done so; I'm sure it would be high on his
> > priority list.
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2003-04-26  2:41 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 11:43 Gnu Emacs way slower than XEmacs David Abrahams
2003-04-22 12:33 ` Miles Bader
2003-04-22 14:15   ` David Abrahams
2003-04-22 15:09     ` Miles Bader
2003-04-22 16:03       ` David Abrahams
2003-04-22 18:32         ` Kai Großjohann
2003-04-23 12:19           ` David Abrahams
2003-04-23 14:08             ` Kai Großjohann
2003-04-23 18:40             ` Eli Zaretskii
2003-04-23 23:52               ` David Abrahams
2003-04-24  7:26                 ` Stephen J. Turnbull
2003-04-24 13:17                   ` Simon Josefsson
2003-04-24 14:36                     ` David Abrahams
2003-04-24 14:58                       ` Simon Josefsson
2003-04-24  7:36                 ` Kai Großjohann
2003-04-24 20:22                   ` Eli Zaretskii
2003-04-24 20:56                     ` Kai Großjohann
2003-04-23  1:39         ` Miles Bader
2003-04-22 13:19 ` Stephen J. Turnbull
2003-04-22 14:17   ` David Abrahams
2003-04-23  9:37     ` Eli Zaretskii
2003-04-23 10:37       ` David Abrahams
2003-04-23 10:38         ` David Abrahams
2003-04-22 18:30   ` Kai Großjohann
2003-04-22 20:17     ` Jason Rumney
2003-04-23  2:55       ` Stephen J. Turnbull
2003-04-23  6:43         ` Jason Rumney
2003-04-23  9:36           ` Eli Zaretskii
2003-04-23 12:21             ` David Abrahams
2003-04-23 18:41               ` Eli Zaretskii
2003-04-26  2:41           ` Ben Wing
2003-04-22 20:19   ` Jason Rumney
2003-04-22 21:21     ` David Abrahams
2003-04-22 13:27 ` Frank Schmitt
2003-04-23 12:18   ` David Abrahams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).