all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* M-x grep significantly slower in emacs 22 (compared to emacs 21)
@ 2007-09-27  9:50 Philippe Waroquiers
  2007-09-27 11:08 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Waroquiers @ 2007-09-27  9:50 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: philippe.waroquiers


M-x grep (on a big file) is much slower with emacs 22 than with emacs 21.
I verified this on an emacs 22 compiled on hp-ux
and on emacs 22 compiled on gnu/linux.
The grep returns about 1900 lines.

performances on gnu-linux (x86, 3 GHz) (elapsed time)
emacs 21: +-2 seconds
emacs 22: +-10 seconds

performances on hp (pa-risc workstation, 400 Mhz) (elapsed time)
emacs 21: +-10 seconds
emacs 22: +-82 seconds

While the M-x grep was running (for the hp test), I used the "top" command 
to see what was going on. 
grep was sleeping most of the time, and emacs was sleeping then running
then sleeping then running. The proportion of sleep time was significant
(I would say: about 80% of the time sleeping).

Note that it is not the grep itself that takes the time, here is the
time taken by the grep on hp:
wao@gull: time grep FILE: tacot1* | wc
1905 24765 250652

real    0m0.78s
user    0m0.63s
sys     0m0.12s
wao@gull:



In GNU Emacs 22.1.1 (hppa1.1-hp-hpux11.11, Motif Version 2.1.0)
 of 2007-09-21 on steer
Windowing system distributor `Hewlett-Packard Company', version 11.0.600000
configured using `configure  'hppa1.1-hp-hpux11.11' '--prefix=/cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated' '--exec-prefix=/cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated/libexec/emacs-22.1' '--mandir=/cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated/man' '--with-gcc=no' '--with-xpm' '--with-x11r6' '--with-x-toolkit=motif' '--x-libraries=/usr/lib/X11R6:/usr/contrib/X11R6/lib' 'build_alias=hppa1.1-hp-hpux11.11' 'host_alias=hppa1.1-hp-hpux11.11' 'target_alias=hppa1.1-hp-hpux11.11' 'CFLAGS=-Ae +O2 +DA1.1' 'LDFLAGS= -L/cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k/lib' 'CPPFLAGS=-I/cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated/work/emacs-22.1/xpm-3.4k ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: nil

Major mode: Lisp Interaction

Minor modes in effect:
  iswitchb-mode: t
  show-paren-mode: t
  which-function-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo> 
<menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
Loading cl-macs...done
Loading gnuserv-compat...done
isearch-forwardisearch-backwardisearch-forward-regexpisearch-backward-regexpquery-replacequery-replace-regexpreplace-regexpreplace-string
Loading gnat-fix-error...done
Loading version_emacs_startup...done
Loading /cm/ot/TOOL/GNU!ESF.EMACS_STUFF/build_G!67.IP.11/generated/share/emacs/22.1/site-lisp/emacs_startup.el (source)...done
Loading easy-mmode...done
Loading cl-seq...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done


-- 
Philippe WAROQUIERS                  Eurocontrol - Central Flow Management Unit
philippe.waroquiers@eurocontrol.int  Rue de la fusee, 96
Tel: +32 2 729 97 35                 1130 Brussels
Fax: +32 2 729 90 22                 Belgium
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.





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

* Re: M-x grep significantly slower in emacs 22 (compared to emacs 21)
  2007-09-27  9:50 M-x grep significantly slower in emacs 22 (compared to emacs 21) Philippe Waroquiers
@ 2007-09-27 11:08 ` Eli Zaretskii
  2007-09-27 19:54   ` WAROQUIERS Philippe
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2007-09-27 11:08 UTC (permalink / raw)
  To: philippe.waroquiers; +Cc: bug-gnu-emacs

> Date: Thu, 27 Sep 2007 11:50:35 +0200 (METDST)
> From: Philippe Waroquiers <wao@cfmu.eurocontrol.int>
> Cc: philippe.waroquiers@eurocontrol.int
> 
> 
> M-x grep (on a big file) is much slower with emacs 22 than with emacs 21.
> I verified this on an emacs 22 compiled on hp-ux
> and on emacs 22 compiled on gnu/linux.
> The grep returns about 1900 lines.
> 
> performances on gnu-linux (x86, 3 GHz) (elapsed time)
> emacs 21: +-2 seconds
> emacs 22: +-10 seconds
> 
> performances on hp (pa-risc workstation, 400 Mhz) (elapsed time)
> emacs 21: +-10 seconds
> emacs 22: +-82 seconds
> 
> While the M-x grep was running (for the hp test), I used the "top" command 
> to see what was going on. 
> grep was sleeping most of the time, and emacs was sleeping then running
> then sleeping then running. The proportion of sleep time was significant
> (I would say: about 80% of the time sleeping).

Thank you for your report.

Does it help to customize the value process-adaptive-read-buffering?




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

* RE: M-x grep significantly slower in emacs 22 (compared to emacs 21)
  2007-09-27 11:08 ` Eli Zaretskii
@ 2007-09-27 19:54   ` WAROQUIERS Philippe
  2007-09-28 19:04     ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: WAROQUIERS Philippe @ 2007-09-27 19:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bug-gnu-emacs

Thanks for the quick feedback.

>Does it help to customize the value process-adaptive-read-buffering?

Yes, it helps (tested on hp-ux, I did not test on gnu-linux):
40 seconds with customization, 120 seconds without.
(??? in my initial report, I gave about 80 seconds. Must have done an
error
while measuring: I have tried twice now, and each time obtained about
120 seconds).


Note that even with this customisation, emacs 22 is significant slower
than emacs 21:
it seems that with this option, emacs 22 sleeps "less", but it still
consumes
significantly more cpu than emacs 21.

I tried the following test:
 create a buffer called *grep*
 C-u M-x shell-command   (date; ... grep command as launched by M-x grep
...; date)
  => this takes about 7 seconds to have the result of grep in the *grep*
buffer

 I afterwards called
  M-x grep-mode

The grep-mode tells that it is fontifying the buffer.
This takes about 17 seconds. (note that the "progress" of the grep seems
to show that some regexp are "more heavy" than others).

So, when comparing with emacs 21, the fontification of the grep results
takes significantly more time and reading the output of the grep command

also takes longer.


 
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.





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

* Re: M-x grep significantly slower in emacs 22 (compared to emacs 21)
  2007-09-27 19:54   ` WAROQUIERS Philippe
@ 2007-09-28 19:04     ` Richard Stallman
  2007-09-28 20:12       ` WAROQUIERS Philippe
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-09-28 19:04 UTC (permalink / raw)
  To: WAROQUIERS Philippe; +Cc: bug-gnu-emacs

If you turn off fontification in Emacs 22, in addition to setting
process-adaptive-read-buffering optimally, how does the time compare
with Emacs 21?




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

* RE: M-x grep significantly slower in emacs 22 (compared to emacs 21)
  2007-09-28 19:04     ` Richard Stallman
@ 2007-09-28 20:12       ` WAROQUIERS Philippe
  0 siblings, 0 replies; 5+ messages in thread
From: WAROQUIERS Philippe @ 2007-09-28 20:12 UTC (permalink / raw)
  To: rms; +Cc: bug-gnu-emacs

>If you turn off fontification in Emacs 22, in addition to setting
>process-adaptive-read-buffering optimally, how does the time compare
>with Emacs 21?

note: it was not directly straightforward how to turn off font-lock for
grep:
   using global-font-lock-mode had no effect.
I finally managed to turn it off in grep-mode by adding a grep setup
hook.

comparing emacs 21 grep 
     with emacs 22 grep (no font-lock,  process-adaptive-read-buffering
set to nil)
the figures are now more comparable:

  emacs 21 takes about 13 seconds
  emacs 22 takes about 16 seconds.

(grep on the same file, measured 2 times, emacs started with -q).

In summary:
  without font-lock and with optimal process-adaptive-read-buffering,
  emacs 22 grep is about 20% slower than emacs 21.

Thanks
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.





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

end of thread, other threads:[~2007-09-28 20:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27  9:50 M-x grep significantly slower in emacs 22 (compared to emacs 21) Philippe Waroquiers
2007-09-27 11:08 ` Eli Zaretskii
2007-09-27 19:54   ` WAROQUIERS Philippe
2007-09-28 19:04     ` Richard Stallman
2007-09-28 20:12       ` WAROQUIERS Philippe

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.