all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ediff-next-difference very slow
@ 2002-04-17 13:21 Roland Winkler
  2002-04-17 14:56 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Roland Winkler @ 2002-04-17 13:21 UTC (permalink / raw)


In GNU Emacs 21.2.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-04-09 on tfkp12
configured using `configure  --prefix=/nfs/common --libexecdir=/nfs/common/lib --bindir=/nfs/common/lib/emacs/21.2/bin/i686-Linux --mandir=/nfs/common/share/man --infodir=/nfs/common/share/info --with-gcc --with-pop --with-x --with-x-toolkit=athena i386-pc-linux'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: POSIX
  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: en_US
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: nil

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


Since I started working with GNU emacs 21.1 ediff has become rather
slow for me. Stepping through the differences between two buffers
using ediff-next-difference takes much longer than with GNU emacs
20.4 I used earlier. Now I have emacs 21.2 and it is still the same.

Now I tried to pin down more accurately what `slow' means, and I was
rather surprised: With a freshly started emacs 21.2, ediff is as
fast as it used to be, no matter whether I use 
`emacs --no-init-file' or whether I load my fairly big .emacs.
(I can't make an accurate comparison because I don't have emacs 20.4
anymore.)

But usually my emacs sessions run for a long time. My present
session started five days ago. Then ediff-next-difference is much
slower. To be more specific:

I created the two files

cat foo <<EOF
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar

foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar

foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
EOF

cat bar <<EOF
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar

foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar

foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
EOF

For some reason I don't understand, elp.el doesn't work with
ediff-next-difference. It gave me the error message

elp-reset-function: ediff-next-difference is not instrumented for profiling

So I defined

(defun my-ediff-next ()
  "Profiling ediff-next-difference."
  (interactive)
  (let ((time-start (nth 1 (current-time))))
    (ediff-next-difference)
    (message "Time difference: %s" (- (nth 1 (current-time)) time-start))))

According to my-ediff-next, ediff-next-difference requires 1 or 2
seconds in a fresh emacs session on my old pentium processor. But an
emacs session that has been running for many days requires 6 or
7 seconds for each of the two differences between the files foo
and bar.

What's going on here? Is this a known problem? How can I try to
further pin down why ediff becomes so slow?

Roland


PS: node `Compilation Tips' in the elisp manual says

   * Profile your program with the `profile' library or the `elp'
     library.  See the files `profile.el' and `elp.el' for instructions.

However, in profile.el it says that profile.el has become obsolete.

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

* Re: ediff-next-difference very slow
  2002-04-17 13:21 ediff-next-difference very slow Roland Winkler
@ 2002-04-17 14:56 ` Eli Zaretskii
  2002-04-17 15:14   ` Roland Winkler
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2002-04-17 14:56 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Roland Winkler <roland.winkler@physik.uni-erlangen.de>
> Date: Wed, 17 Apr 2002 15:21:37 +0200
> 
> According to my-ediff-next, ediff-next-difference requires 1 or 2
> seconds in a fresh emacs session on my old pentium processor. But an
> emacs session that has been running for many days requires 6 or
> 7 seconds for each of the two differences between the files foo
> and bar.
> 
> What's going on here? Is this a known problem? How can I try to
> further pin down why ediff becomes so slow?

It seems that having many overlays in a buffer slows down Emacs quite
a bit.  Perhaps this problem is another manifestation of that?

> PS: node `Compilation Tips' in the elisp manual says
> 
>    * Profile your program with the `profile' library or the `elp'
>      library.  See the files `profile.el' and `elp.el' for instructions.
> 
> However, in profile.el it says that profile.el has become obsolete.

Thanks, I fixed this for the next release.

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

* Re: ediff-next-difference very slow
  2002-04-17 14:56 ` Eli Zaretskii
@ 2002-04-17 15:14   ` Roland Winkler
  2002-04-17 17:11     ` Eli Zaretskii
  2002-04-18 18:44     ` Richard Stallman
  0 siblings, 2 replies; 8+ messages in thread
From: Roland Winkler @ 2002-04-17 15:14 UTC (permalink / raw)


On Wed Apr 17 2002 Eli Zaretskii wrote:
> It seems that having many overlays in a buffer slows down Emacs quite
> a bit.  Perhaps this problem is another manifestation of that?

This is something I do not understand: Is it sufficient here for
slowing emacs down that one buffer of all the open buffers has many
overlays? Or do you refer to the buffers that are involved in the
ediff session? The point is that the buffers involved in the ediff
session are the same in a fresh emacs session and in an emacs
session that is running for many days.

Roland

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

* Re: ediff-next-difference very slow
  2002-04-17 15:14   ` Roland Winkler
@ 2002-04-17 17:11     ` Eli Zaretskii
  2002-04-18 18:44     ` Richard Stallman
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2002-04-17 17:11 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Roland Winkler <roland.winkler@physik.uni-erlangen.de>
> Date: Wed, 17 Apr 2002 17:14:27 +0200
> 
> On Wed Apr 17 2002 Eli Zaretskii wrote:
> > It seems that having many overlays in a buffer slows down Emacs quite
> > a bit.  Perhaps this problem is another manifestation of that?
> 
> This is something I do not understand: Is it sufficient here for
> slowing emacs down that one buffer of all the open buffers has many
> overlays?

I don't think this riddle is solved yet; please wait for Richard to
chime in, he was following this problem.

> The point is that the buffers involved in the ediff
> session are the same in a fresh emacs session and in an emacs
> session that is running for many days.

Yes, someone else reported a similar problem with RMAIL buffers:
after a while, RMAIL becomes painfully slow.

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

* Re: ediff-next-difference very slow
  2002-04-17 15:14   ` Roland Winkler
  2002-04-17 17:11     ` Eli Zaretskii
@ 2002-04-18 18:44     ` Richard Stallman
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2002-04-18 18:44 UTC (permalink / raw)
  Cc: bug-gnu-emacs

    This is something I do not understand: Is it sufficient here for
    slowing emacs down that one buffer of all the open buffers has many
    overlays?

Overlays are always stored per buffer, so it should only be the
overlays in the buffers being displayed that can make a slowdown.

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

* Re: ediff-next-difference very slow
@ 2002-04-19 21:31 Michael Kifer
  2002-04-20 12:02 ` Roland Winkler
  2002-04-22  8:46 ` Ralf Fassel
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Kifer @ 2002-04-19 21:31 UTC (permalink / raw)
  Cc: bug-gnu-emacs



To help us find the culprit, we need more info.

Do you do something unusual, such as running long ediff (not emacs) sessions
that last several days?
Do you see the slowdown regardless of whether you used ediff in the prior
days or it depends on how many times you used ediff within the same emacs
session?
Finally, did you notice a similar slowdown with other emacs applications?


> In GNU Emacs 21.2.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>  of 2002-04-09 on tfkp12
> configured using `configure  --prefix=/nfs/common --libexecdir=/nfs/common/lib --bindir=/nfs/common/lib/emacs/21.2/bin/i686-Linux --mandir=/nfs/common/share/
> man --infodir=/nfs/common/share/info --with-gcc --with-pop --with-x --with-x-toolkit=athena i386-pc-linux'
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: POSIX
>   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: en_US
>   locale-coding-system: iso-latin-1
>   default-enable-multibyte-characters: nil
> 
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
> 
> 
> Since I started working with GNU emacs 21.1 ediff has become rather
> slow for me. Stepping through the differences between two buffers
> using ediff-next-difference takes much longer than with GNU emacs
> 20.4 I used earlier. Now I have emacs 21.2 and it is still the same.
> 
> Now I tried to pin down more accurately what `slow' means, and I was
> rather surprised: With a freshly started emacs 21.2, ediff is as
> fast as it used to be, no matter whether I use 
> `emacs --no-init-file' or whether I load my fairly big .emacs.
> (I can't make an accurate comparison because I don't have emacs 20.4
> anymore.)
> 
> But usually my emacs sessions run for a long time. My present
> session started five days ago. Then ediff-next-difference is much
> slower. To be more specific:
> 
> I created the two files
> 
> cat foo <<EOF
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> 
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> 
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> 
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> foo foo bar foo foo bar foo foo bar foo foo bar foo foo bar
> 
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> EOF
> 
> cat bar <<EOF
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> 
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> 
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> 
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> foo bar bar foo bar bar foo bar bar foo bar bar foo bar bar
> 
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> EOF
> 
> For some reason I don't understand, elp.el doesn't work with
> ediff-next-difference. It gave me the error message
> 
> elp-reset-function: ediff-next-difference is not instrumented for profiling
> 
> So I defined
> 
> (defun my-ediff-next ()
>   "Profiling ediff-next-difference."
>   (interactive)
>   (let ((time-start (nth 1 (current-time))))
>     (ediff-next-difference)
>     (message "Time difference: %s" (- (nth 1 (current-time)) time-start))))
> 
> According to my-ediff-next, ediff-next-difference requires 1 or 2
> seconds in a fresh emacs session on my old pentium processor. But an
> emacs session that has been running for many days requires 6 or
> 7 seconds for each of the two differences between the files foo
> and bar.
> 
> What's going on here? Is this a known problem? How can I try to
> further pin down why ediff becomes so slow?
> 
> Roland
> 
> 
> PS: node `Compilation Tips' in the elisp manual says
> 
>    * Profile your program with the `profile' library or the `elp'
>      library.  See the files `profile.el' and `elp.el' for instructions.
> 
> However, in profile.el it says that profile.el has become obsolete.

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

* Re: ediff-next-difference very slow
  2002-04-19 21:31 Michael Kifer
@ 2002-04-20 12:02 ` Roland Winkler
  2002-04-22  8:46 ` Ralf Fassel
  1 sibling, 0 replies; 8+ messages in thread
From: Roland Winkler @ 2002-04-20 12:02 UTC (permalink / raw)
  Cc: bug-gnu-emacs

On Fri Apr 19 2002 Michael Kifer wrote:
> 
> 
> To help us find the culprit, we need more info.
> 
> Do you do something unusual, such as running long ediff (not
> emacs) sessions that last several days?

No, I don't have any long ediff sessions. Typically, they do not
last longer than an hour. And my ediff buffers are small, typically
less than 100kb.

> Do you see the slowdown regardless of whether you used ediff in
> the prior days or it depends on how many times you used ediff
> within the same emacs session?

This is more difficult to say because I haven't done any bookkeeping
yet. But I'll watch these thing more carefully and let you know.

What I can say is that I don't use ediff very often. I need it once
every two or three days or so (and, as I said, I have short ediff
session with small buffers).

> Finally, did you notice a similar slowdown with other emacs
> applications?

Since I upgraded from GNU emacs 20 to 21 it SEEMS to me that emacs
in general has slowed down for me. But I haven't been able yet to
pin this down. The present bug report on ediff was actually the
first example where I could be a little more explicit.

Usually, in my emacs sessions I am loading and using a bunch of
packages which make it very difficult to pin down the culprit. But
there are several things I am trying right now, and I'll keep you
posted.

Roland

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

* Re: ediff-next-difference very slow
  2002-04-19 21:31 Michael Kifer
  2002-04-20 12:02 ` Roland Winkler
@ 2002-04-22  8:46 ` Ralf Fassel
  1 sibling, 0 replies; 8+ messages in thread
From: Ralf Fassel @ 2002-04-22  8:46 UTC (permalink / raw)


* kifer@cs.sunysb.edu (Michael Kifer)
(I am not the original author, but have similar problems with ediff.)

| Do you do something unusual, such as running long ediff (not emacs)
| sessions that last several days?

No.  usually running time is 1/2 hour per file, one ediff session
rarely lasts longer than 1/2 day.  The slow down is max when text
regions of more than say 40 lines with lots of white space differences
and a few changed words in few lines are shown.  It does not matter
whether there are 5 or 50 difference regions per file.

| Do you see the slowdown regardless of whether you used ediff in the
| prior days or it depends on how many times you used ediff within the
| same emacs session?

No.  I log out every day, so max emacs/ediff uptime is 12-14hours.

| Finally, did you notice a similar slowdown with other emacs applications?

Yes.  Tar-mode and the other archive modes (arc, zip) are also slow
when extracting archive members for display, compared to 19.34.

R'

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

end of thread, other threads:[~2002-04-22  8:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-17 13:21 ediff-next-difference very slow Roland Winkler
2002-04-17 14:56 ` Eli Zaretskii
2002-04-17 15:14   ` Roland Winkler
2002-04-17 17:11     ` Eli Zaretskii
2002-04-18 18:44     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-04-19 21:31 Michael Kifer
2002-04-20 12:02 ` Roland Winkler
2002-04-22  8:46 ` Ralf Fassel

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.