From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jwalt@garni.ch (=?UTF-8?Q?J=C3=B6rg?= Walter) Newsgroups: gmane.emacs.bugs Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Date: Tue, 18 Sep 2012 01:51:31 +0200 Message-ID: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1347926210 3878 80.91.229.3 (17 Sep 2012 23:56:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2012 23:56:50 +0000 (UTC) To: 12463@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 18 01:56:54 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TDlBN-0007Tk-BO for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Sep 2012 01:56:53 +0200 Original-Received: from localhost ([::1]:35858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDlBJ-0006Cm-6C for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Sep 2012 19:56:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDlBG-0006Cg-Rz for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:56:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDlBF-0000Kd-Sw for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:56:46 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDlBF-0000KZ-PU for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:56:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TDlCU-0005S2-5A for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jwalt@garni.ch (=?UTF-8?Q?J=C3=B6rg?= Walter) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Sep 2012 23:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134792624820884 (code B ref -1); Mon, 17 Sep 2012 23:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Sep 2012 23:57:28 +0000 Original-Received: from localhost ([127.0.0.1]:40513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDlBv-0005Qn-P1 for submit@debbugs.gnu.org; Mon, 17 Sep 2012 19:57:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43835) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDl8B-0005Ij-Gr for submit@debbugs.gnu.org; Mon, 17 Sep 2012 19:53:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDl6v-0007P4-9i for submit@debbugs.gnu.org; Mon, 17 Sep 2012 19:52:18 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:45416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDl6v-0007Oy-69 for submit@debbugs.gnu.org; Mon, 17 Sep 2012 19:52:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDl6u-0005vW-2b for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:52:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDl6s-0007Oc-I2 for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:52:15 -0400 Original-Received: from selda.webserv-it.de ([91.211.43.170]:41953 helo=mercenary.garni.ch) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDl6s-0007OO-7z for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2012 19:52:14 -0400 Original-Received: from 77-22-152-244-dynip.superkabel.de ([77.22.152.244] helo=queen) by mercenary.garni.ch with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TDl6h-0004FK-OF for bug-gnu-emacs@gnu.org; Tue, 18 Sep 2012 01:52:06 +0200 X-SA-Exim-Connect-IP: 77.22.152.244 X-SA-Exim-Mail-From: jwalt@garni.ch X-SA-Exim-Version: 4.2.1 (built Sat, 07 Nov 2009 20:03:47 +0000) X-SA-Exim-Scanned: Yes (on mercenary.garni.ch) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 17 Sep 2012 19:57:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64535 Archived-At: 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)) 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=3Dno'' 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: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f ~ / . e m a c s . d / b u . g .=20 e l M-x e v a l - b u f f e r C-x=20 k M-x r e p o r t - e m Recent messages: Invalid pixel value in image `(image :type pbm :data P2 1 1 255 )' QuitInvalid pixel value in image `(image :type pbm :data P2 1 1 255 )' Invalid pixel value in image `(image :type pbm :data P2 1 1 255 )' Invalid pixel value in image `(image :type pbm :data P2 1 1 255 )' Invalid pixel value in image `(image :type pbm :data P2 1 1 255 )' Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils benchmark time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --=20 CU J=C3=B6rg