GNU bug report logs -
#12463
24.2; pos-visible-in-window-p gets slower over time
Previous Next
Reported by: jwalt <at> garni.ch (Jörg Walter)
Date: Mon, 17 Sep 2012 23:58:01 UTC
Severity: normal
Merged with 12468
Found in version 24.2
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 12463 <at> debbugs.gnu.org (full text, mbox):
> From: jwalt <at> garni.ch (Jörg Walter)
> Date: Tue, 18 Sep 2012 01:51:31 +0200
>
> Emacs gets arbitrarily slow over time. I was able to narrow down the
> problem to `pos-visible-in-window-p', which is, unfortunately, called as
> part of lots of common commands. That function call is getting slower
> each time it is called, if two conditions are met.
>
> The first condition I was able to pin is the value of
> `header-line-format'. The bug only occurs when it includes an image (as
> is common when using tabbar.el).
>
> It also depends on buffer contents, although I was not able to determine
> a minimal condition. It happens with the fancy splash screen, but not
> with the scratch buffer. I've tried inserting an image and using face
> `variable-pitch', but those two aren't enough to trigger the bug.
>
> This code sample demonstrates the bug. Run it in an "emacs -Q" instance
> via `eval-buffer' and be amazed at the unbounded (linear) growth of
> execution time for each iteration:
>
> (defun bug ()
> "trigger bug related to pos-visible-in-window-p"
> (interactive)
> (benchmark 1000 '(pos-visible-in-window-p t)))
>
> (fancy-startup-screen)
> (setq header-line-format '((#("x" 0 1 (display (image :type pbm :data "P2 1 1 255\n"))))))
> (goto-char (point-min))
> (while t (bug))
I cannot reproduce the slow-down on my machine (Windows XP). What I
see is constant time, give or take 2%, with no growth trend
whatsoever.
I don't have access to GUI sessions on any configuration close to this:
> In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
> of 2012-09-17 on queen
> Windowing system distributor `The X.Org Foundation', version 11.0.11103000
> Configured using:
> `configure '--with-gif=no''
Can anyone else reproduce this?
Jörg, does this happen with earlier versions of Emacs, like 24.1 or
23.3?
This bug report was last modified 12 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.