From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time 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: To: 12463@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134792624820884 (code B ref -1); Mon, 17 Sep 2012 23:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Sep 2012 23:57:28 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 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 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 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 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 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 From: jwalt@garni.ch (=?UTF-8?Q?J=C3=B6rg?= Walter) Date: Tue, 18 Sep 2012 01:51:31 +0200 Message-ID: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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 From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 07:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: jwalt@garni.ch (=?UTF-8?Q?J=C3=B6rg?= Walter) Cc: 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134795447017786 (code B ref 12463); Tue, 18 Sep 2012 07:48:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 07:47:50 +0000 Received: from localhost ([127.0.0.1]:40792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDsX7-0004cp-Qa for submit@debbugs.gnu.org; Tue, 18 Sep 2012 03:47:50 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:33644) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDsX4-0004cg-VG for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 03:47:48 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAJ00E00C3WKS00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 10:46:26 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAJ00E3WC9E0ZM0@a-mtaout22.012.net.il>; Tue, 18 Sep 2012 10:46:26 +0300 (IDT) Date: Tue, 18 Sep 2012 10:46:35 +0300 From: Eli Zaretskii In-reply-to: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> Message-id: <83mx0n22p0.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: jwalt@garni.ch (J=C3=B6rg Walter) > Date: Tue, 18 Sep 2012 01:51:31 +0200 >=20 > Emacs gets arbitrarily slow over time. I was able to narrow down th= e > problem to `pos-visible-in-window-p', which is, unfortunately, call= ed as > part of lots of common commands. That function call is getting slow= er > each time it is called, if two conditions are met. >=20 > 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). >=20 > It also depends on buffer contents, although I was not able to dete= rmine > a minimal condition. It happens with the fancy splash screen, but n= ot > with the scratch buffer. I've tried inserting an image and using fa= ce > `variable-pitch', but those two aren't enough to trigger the bug. >=20 > This code sample demonstrates the bug. Run it in an "emacs -Q" inst= ance > via `eval-buffer' and be amazed at the unbounded (linear) growth of > execution time for each iteration: >=20 > (defun bug () > "trigger bug related to pos-visible-in-window-p" > (interactive) > (benchmark 1000 '(pos-visible-in-window-p t))) >=20 > (fancy-startup-screen) > (setq header-line-format '((#("x" 0 1 (display (image :type pbm :da= ta "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 thi= s: > 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.1= 1103000 > Configured using: > `configure '--with-gif=3Dno'' Can anyone else reproduce this? J=C3=B6rg, does this happen with earlier versions of Emacs, like 24.1= or 23.3? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: =?UTF-8?Q?J=C3=B6rg?= Walter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 09:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134796167228309 (code B ref 12463); Tue, 18 Sep 2012 09:48:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 09:47:52 +0000 Received: from localhost ([127.0.0.1]:40932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDuPH-0007MX-Is for submit@debbugs.gnu.org; Tue, 18 Sep 2012 05:47:52 -0400 Received: from selda.webserv-it.de ([91.211.43.170]:59195 helo=mercenary.garni.ch) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDuPE-0007MP-Ut for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 05:47:50 -0400 Received: from 77-22-152-244-dynip.superkabel.de ([77.22.152.244] helo=queen.localnet) by mercenary.garni.ch with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TDuNq-00053l-Fk for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 11:46:28 +0200 From: =?UTF-8?Q?J=C3=B6rg?= Walter Date: Tue, 18 Sep 2012 11:46:13 +0200 Message-ID: <5511358.p8J1TLefsG@queen> Organization: Syntax-K User-Agent: KMail/4.8.4 (Linux/3.2.0-23-lowlatency; KDE/4.8.4; x86_64; ; ) In-Reply-To: <83mx0n22p0.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-SA-Exim-Connect-IP: 77.22.152.244 X-SA-Exim-Mail-From: jwalt@garni.ch X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mercenary.garni.ch X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED shortcircuit=no autolearn=disabled version=3.3.1 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-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Op den Dingsdag, de 18. September 2012 Klock 10:46:35 hett Eli Zaretski= i=20 schreven: > 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. >=20 > I don't have access to GUI sessions on any configuration close to thi= s: > > In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10= ) > >=20 > > of 2012-09-17 on queen > >=20 > > Windowing system distributor `The X.Org Foundation', version 11.0.1= 1103000 > >=20 > > Configured using: > > `configure '--with-gif=3Dno'' >=20 > Can anyone else reproduce this? >=20 > J=F6rg, does this happen with earlier versions of Emacs, like 24.1 or= > 23.3? I've done some additional tests: It does *not* happen with Ubuntu's ema= cs23=20 (23.3.1). Just for cross-checking, I ran Win32 emacs 24.2 once via wine= and=20 once in VirtualBox+WinXP, in both cases no bug. It *does* happen with Ubuntu's emacs24 (24.1.1), which is where I first= noticed=20 the problem. It also happens on all X toolkits (gtk, gtk3, athena, luc= id). --=20 CU =09J=F6rg From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 10:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=B6rg?= Walter Cc: 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134796391531615 (code B ref 12463); Tue, 18 Sep 2012 10:26:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 10:25:15 +0000 Received: from localhost ([127.0.0.1]:40956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDuzT-0008Dq-7Y for submit@debbugs.gnu.org; Tue, 18 Sep 2012 06:25:15 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:34067) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDuzQ-0008Di-7f for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 06:25:13 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAJ00F00JIGWS00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 13:23:21 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAJ00FWTJIWWO00@a-mtaout22.012.net.il>; Tue, 18 Sep 2012 13:23:21 +0300 (IDT) Date: Tue, 18 Sep 2012 13:23:30 +0300 From: Eli Zaretskii In-reply-to: <5511358.p8J1TLefsG@queen> Message-id: <83fw6f1vfh.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <5511358.p8J1TLefsG@queen> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: J=F6rg Walter > Date: Tue, 18 Sep 2012 11:46:13 +0200 >=20 > > J=F6rg, does this happen with earlier versions of Emacs, like 24.= 1 or > > 23.3? >=20 > I've done some additional tests: It does *not* happen with Ubuntu's= emacs23=20 > (23.3.1). Just for cross-checking, I ran Win32 emacs 24.2 once via = wine and=20 > once in VirtualBox+WinXP, in both cases no bug. >=20 > It *does* happen with Ubuntu's emacs24 (24.1.1), which is where I f= irst noticed=20 > the problem. It also happens on all X toolkits (gtk, gtk3, athena,= lucid). Thanks. Would it be possible for you to time the related code on the C level, and find which part(s) are responsible for the slow-down? To do that, insert into the C code calls to a function that returns some measure of time before and after the code fragment being timed, and print the difference between two successive calls if that difference exceeds some threshold. For example: double timer_time (void) { struct timeval tv; gettimeofday (&tv, NULL); return tv.tv_usec * 0.000001 + tv.tv_sec; } [...] double t1, t2; extern double timer_time (void); [...] t1 =3D timer_time (); /* Some code being timed. */ t2 =3D timer_time (); if (t2 - t1 >=3D 0.001) /* show time from 1 msec and up */ { =09fprintf (stderr, "foo took %.4g sec\n", t2 - t1); =09fflush (stderr); } The code in question is Fpos_visible_in_window_p itself, and its main subroutine, pos_visible_p. The latter is a large function, so if it is the culprit, successively dividing it into smaller pieces by bisection will allow you to show what part is taking the most time. If you can do the above, the first thing to establish is whether timing the whole of Fpos_visible_in_window_p on the C level shows approximately the same times and exhibits the same growth trend as what 'benchmark' shows on the Lisp level. If it doesn't show the sam= e timings, then the code which implements pos-visible-in-window-p is no= t the issue, and we should look elsewhere for the explanations. Also, if you repeat the benchmark after terminating it, do the number= s start from the last (longest) measurement or from the first (shortest), or somewhere in between? IOW, do you need to restart Emacs to reset the measurements back to the first shortest value? Thanks. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13479815658902 (code B ref 12463); Tue, 18 Sep 2012 15:20:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 15:19:25 +0000 Received: from localhost ([127.0.0.1]:41995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDza8-0002JX-QF for submit@debbugs.gnu.org; Tue, 18 Sep 2012 11:19:25 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:42316) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDza6-0002JH-3q for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 11:19:23 -0400 Received: by obbwc20 with SMTP id wc20so10332109obb.3 for <12463@debbugs.gnu.org>; Tue, 18 Sep 2012 08:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=yWfoZUpvIDVSOcQYaKzQQeu4TKA3yRWgafDu47AECmM=; b=Jkj/6V7SPSh4lXEnqUfvgEZVwW/pjYui0L0EgiayaX5C2vNQrDZcsj3NFcBOqBAylv 3ku5siy6OQkI6JKd9ZEX5/9SVDQXv/T+OcqqAGcSjNpSEdchZEDYc6nXFuXP59YUSgzH hPeaT6ikQieOoHwcnUfLQaaLQHSlyRWJ/11zIh/Xh3TxYm6OJnVBjqcyM+IyfL6jh87T Daw7rcb3nPbjGszapkCR6M0iOlpCsIRlvQ/xqy8DGzW2a040LSAIYtL1tryDsPyRSsdK GTUK4t9S2SpDh92ebsCTq6tpuW4iPWRrfCNcpfqGQ0ClXHKdz5ySJNqMPlINNSU+ozPQ inLA== Received: by 10.60.19.132 with SMTP id f4mr333562oee.17.1347981480724; Tue, 18 Sep 2012 08:18:00 -0700 (PDT) Received: from ulysses ([155.69.172.88]) by mx.google.com with ESMTPS id a3sm11947881oeb.6.2012.09.18.08.17.57 (version=SSLv3 cipher=OTHER); Tue, 18 Sep 2012 08:17:59 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> Date: Tue, 18 Sep 2012 23:17:53 +0800 In-Reply-To: <83mx0n22p0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Sep 2012 10:46:35 +0300") Message-ID: <87d31jcqce.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: > Can anyone else reproduce this? I can reproduce this. On bisecting, the problem first shows up with revno: 104186 fixes bug: http://debbugs.gnu.org/8640 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-05-10 12:31:33 +0200 message: src/image.c (Finit_image_library): Return t for built-in image types. A quick glance at the diff of this revision does not reveal immediately why it causes the problem, though. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Matt Lundin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=B6rg?= Walter Cc: 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134798348715295 (code B ref 12463); Tue, 18 Sep 2012 15:52:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 15:51:27 +0000 Received: from localhost ([127.0.0.1]:42016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE057-0003yX-Ca for submit@debbugs.gnu.org; Tue, 18 Sep 2012 11:51:27 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53299) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TDzO4-0001gQ-JM for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 11:06:58 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 9061A20B56; Tue, 18 Sep 2012 11:05:35 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 18 Sep 2012 11:05:35 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=imapmail.org; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=S6rT9h936DvzxJEWAxd2RJhILCc=; b=bXE7Cq4XG+BFiNW4QRwhZNuOO0m4 yHJyYcxd9HQ5t4ScnBjrcWP+BWVBFycDpUXlQmijk6Hw1EC9qzgEdXpCpo01LAzY tIRrvJ/ZRZVx6z1kD9jVkinO3NdjSbbgc9HgGhdbMHq/9tLku9Kw+NtLI73QeVT/ AAtjz6CpEysKlyo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=S6rT9h936DvzxJEWAxd2RJ hILCc=; b=r1ZzLpOjSDQX1UywwE3McdWoDZBMNBzlutEDS7Ev1KtETz9frTM3+t Cx3i8yOwcWQD6E4dUj36/djI9A4fBw/Nu2vf1+RZRAXr9um/DYy0A4E6pS1LKRyf 9POjqshuNQorWd4CrfKeCAIs+r1iySNBLy9V62lTg4LUyvK7ptDhI= X-Sasl-enc: h6EYV8e7rgRk2i0JXHRfubFtr/tMUVf2zLlWXvupYbQo 1347980735 Received: from archdesk (unknown [209.147.96.226]) by mail.messagingengine.com (Postfix) with ESMTPA id 3B684483517; Tue, 18 Sep 2012 11:05:35 -0400 (EDT) From: Matt Lundin References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <5511358.p8J1TLefsG@queen> Date: Tue, 18 Sep 2012 10:05:34 -0500 In-Reply-To: <5511358.p8J1TLefsG@queen> ("=?UTF-8?Q?J=C3=B6rg?= Walter"'s message of "Tue, 18 Sep 2012 11:46:13 +0200") Message-ID: <87k3vrnzgh.fsf@fastmail.fm> User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Tue, 18 Sep 2012 11:51:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) J=C3=B6rg Walter writes: > I've done some additional tests: It does *not* happen with Ubuntu's > emacs23 (23.3.1). Just for cross-checking, I ran Win32 emacs 24.2 once > via wine and once in VirtualBox+WinXP, in both cases no bug. > > It *does* happen with Ubuntu's emacs24 (24.1.1), which is where I > first noticed the problem. It also happens on all X toolkits (gtk, > gtk3, athena, lucid). Does it happen when using x instead of xft as the font backend? I have found that xft rendering is sluggish in emacs 24 (on Arch Linux, in my case). A single call to pos-visible-in-window-p can take as much as 0.3 secs according to ELP (e.g., when opening an outline heading, especially if it contains multi-byte encodings). This slowdown does not occur when xft is turned off (i.e, by placing "Emacs.FontBackend: x" in .Xresources). AFAICT, the bottleneck seems to be in the emacs xft rendering. I tested this by opening two frames showing the same outline buffer. One of the frames was a X frame using xft fonts; another frame was running in a console (urxvt, which also uses xft rendering but shows no similar slowdown). When opening an outline entry containing multibyte characters, it appeared instantly in the console frame but only after a substantial lag on the X frame. In other words, the culprit may be something other than pos-visible-in-window-p. For instance, when running emacs on x with xft enabled, I find it can take as much as 3-4 seconds (according to elp) to create a new frame with C-x 5 2. When running emacs on x with xft disabled, new frames are created immediately. Best, Matt From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: =?UTF-8?Q?J=C3=B6rg?= Walter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134798523221057 (code B ref 12463); Tue, 18 Sep 2012 16:21:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 16:20:32 +0000 Received: from localhost ([127.0.0.1]:42025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0XI-0005TZ-Dm for submit@debbugs.gnu.org; Tue, 18 Sep 2012 12:20:32 -0400 Received: from selda.webserv-it.de ([91.211.43.170]:32932 helo=mercenary.garni.ch) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0XF-0005TJ-QJ for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 12:20:31 -0400 Received: from 77-22-152-244-dynip.superkabel.de ([77.22.152.244] helo=queen.localnet) by mercenary.garni.ch with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TE0Vt-0005im-Ma for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 18:19:08 +0200 From: =?UTF-8?Q?J=C3=B6rg?= Walter Date: Tue, 18 Sep 2012 18:18:56 +0200 Message-ID: <4023344.MyoQPQRfcJ@queen> Organization: Syntax-K User-Agent: KMail/4.8.4 (Linux/3.2.0-23-lowlatency; KDE/4.8.4; x86_64; ; ) In-Reply-To: <87d31jcqce.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart4489839.oiHcif47Kq" Content-Transfer-Encoding: 7Bit X-SA-Exim-Connect-IP: 77.22.152.244 X-SA-Exim-Mail-From: jwalt@garni.ch X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mercenary.garni.ch X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED shortcircuit=no autolearn=disabled version=3.3.1 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-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --nextPart4489839.oiHcif47Kq Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Op den Dingsdag, de 18. September 2012 Klock 23:17:53 hett Chong Yidong= =20 schreven: > Eli Zaretskii writes: > > Can anyone else reproduce this? >=20 > I can reproduce this. On bisecting, the problem first shows up with >=20 > revno: 104186 > fixes bug: http://debbugs.gnu.org/8640 > committer: Juanma Barranquero > branch nick: trunk > timestamp: Tue 2011-05-10 12:31:33 +0200 > message: > src/image.c (Finit_image_library): Return t for built-in image type= s. >=20 > A quick glance at the diff of this revision does not reveal immediate= ly > why it causes the problem, though. I have no idea why that revision triggers the bug either, but here is a= patch=20 that fixes the problem. I have no idea if it matches your quality stand= ards,=20 but I think it is clean enough. I've reused and adapted some code alrea= dy=20 present for Win32 (which is the reason they don't suffer the same probl= em). The linked list `image_types' grows without bounds because=20 CHECK_LIB_AVAILABLE/define_image_type never checked if the given image = type is=20 already in `image_types'. My lisp code triggered tons of `Finit_image_l= ibrary'=20 calls. Since the list is searched linearly at some point, that explains= the=20 run-time impact. I have no idea what was originally supposed to ensure `image_types' doe= sn't=20 include duplicate entries, so the patch may be way off... hope someone = actually=20 knows what is suppsed to go on there. --=20 CU =09J=F6rg --nextPart4489839.oiHcif47Kq Content-Disposition: attachment; filename="emacs-image-bug.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="emacs-image-bug.patch" --- image.c 2012-09-18 18:10:21.952695267 +0200 +++ image.c.new 2012-09-18 18:09:18.173692841 +0200 @@ -575,12 +575,11 @@ static void x_emboss (struct frame *, struct image *); static int x_build_heuristic_mask (struct frame *, struct image *, Lisp_Object); -#ifdef HAVE_NTGUI + +static Lisp_Object loaded_image_types; + #define CACHE_IMAGE_TYPE(type, status) \ - do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) -#else -#define CACHE_IMAGE_TYPE(type, status) -#endif + do { loaded_image_types = Fcons (Fcons (type, status), loaded_image_types); } while (0) #define ADD_IMAGE_TYPE(type) \ do { Vimage_types = Fcons (type, Vimage_types); } while (0) @@ -8743,12 +8742,10 @@ of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { -#ifdef HAVE_NTGUI /* Don't try to reload the library. */ - Lisp_Object tested = Fassq (type, Vlibrary_cache); + Lisp_Object tested = Fassq (type, loaded_image_types); if (CONSP (tested)) return XCDR (tested); -#endif /* Types pbm and xbm are built-in and always available. */ if (EQ (type, Qpbm) || EQ (type, Qxbm)) @@ -8828,6 +8825,9 @@ non-numeric, there is no explicit limit on the size of images. */); Vmax_image_size = make_float (MAX_IMAGE_SIZE); + loaded_image_types = Qnil; + staticpro(&loaded_image_types); + DEFSYM (Qpbm, "pbm"); ADD_IMAGE_TYPE (Qpbm); --nextPart4489839.oiHcif47Kq-- From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134798525421130 (code B ref 12463); Tue, 18 Sep 2012 16:21:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 16:20:54 +0000 Received: from localhost ([127.0.0.1]:42028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0Xd-0005Uj-VK for submit@debbugs.gnu.org; Tue, 18 Sep 2012 12:20:54 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:59444) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0Xb-0005UT-RY for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 12:20:53 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAJ00900ZT4QH00@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 19:19:05 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAJ009YXZZTPR40@a-mtaout21.012.net.il>; Tue, 18 Sep 2012 19:19:05 +0300 (IDT) Date: Tue, 18 Sep 2012 19:19:15 +0300 From: Eli Zaretskii In-reply-to: <87d31jcqce.fsf@gnu.org> Message-id: <83627b1eyk.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: jwalt@garni.ch (J=F6rg Walter), 12463@debbugs.gnu.org > Date: Tue, 18 Sep 2012 23:17:53 +0800 >=20 > Eli Zaretskii writes: >=20 > > Can anyone else reproduce this? >=20 > I can reproduce this. On bisecting, the problem first shows up wit= h >=20 > revno: 104186 > fixes bug: http://debbugs.gnu.org/8640 > committer: Juanma Barranquero > branch nick: trunk > timestamp: Tue 2011-05-10 12:31:33 +0200 > message: > src/image.c (Finit_image_library): Return t for built-in image ty= pes. >=20 > A quick glance at the diff of this revision does not reveal immedia= tely > why it causes the problem, though. Can you see what happened in revision 104105? That was before the previous image-handling code was modified into its present form, whic= h originally made pbm images unavailable (that was fixed in 104186). The question is, was the recipe in this bug slow or fast then. Knowing that will probably give a hint in the right direction. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 16:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Matt Lundin Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134798553422111 (code B ref 12463); Tue, 18 Sep 2012 16:26:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 16:25:34 +0000 Received: from localhost ([127.0.0.1]:42038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0c9-0005kU-UR for submit@debbugs.gnu.org; Tue, 18 Sep 2012 12:25:34 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:59897) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0c6-0005k9-IE for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 12:25:31 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAK00900042RK00@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 19:24:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAK009W6081QD30@a-mtaout21.012.net.il>; Tue, 18 Sep 2012 19:24:01 +0300 (IDT) Date: Tue, 18 Sep 2012 19:24:10 +0300 From: Eli Zaretskii In-reply-to: <87k3vrnzgh.fsf@fastmail.fm> X-012-Sender: halo1@inter.net.il Message-id: <834nmv1eqd.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <5511358.p8J1TLefsG@queen> <87k3vrnzgh.fsf@fastmail.fm> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Matt Lundin > Date: Tue, 18 Sep 2012 10:05:34 -0500 > Cc: 12463@debbugs.gnu.org > > AFAICT, the bottleneck seems to be in the emacs xft rendering. I tested > this by opening two frames showing the same outline buffer. One of the > frames was a X frame using xft fonts; another frame was running in a > console (urxvt, which also uses xft rendering but shows no similar > slowdown). When opening an outline entry containing multibyte > characters, it appeared instantly in the console frame but only after a > substantial lag on the X frame. > > In other words, the culprit may be something other than > pos-visible-in-window-p. pos-visible-in-window-p invokes many functions involved in redisplay, including the font shaper, it just arranges things so that nothing is output to the glass. So anything that slows down font shaping will also slow down pos-visible-in-window-p. However, in this case it looks like image drawing is the culprit, not font shaping. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: =?UTF-8?Q?J=C3=B6rg?= Walter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134798570222671 (code B ref 12463); Tue, 18 Sep 2012 16:29:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 16:28:22 +0000 Received: from localhost ([127.0.0.1]:42051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0er-0005tc-LW for submit@debbugs.gnu.org; Tue, 18 Sep 2012 12:28:21 -0400 Received: from selda.webserv-it.de ([91.211.43.170]:33008 helo=mercenary.garni.ch) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE0eq-0005tS-24 for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 12:28:20 -0400 Received: from 77-22-152-244-dynip.superkabel.de ([77.22.152.244] helo=queen.localnet) by mercenary.garni.ch with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TE0dR-0005kM-Sq for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 18:26:58 +0200 From: =?UTF-8?Q?J=C3=B6rg?= Walter Date: Tue, 18 Sep 2012 18:26:45 +0200 Message-ID: <17979218.71hQQLqaqS@queen> Organization: Syntax-K User-Agent: KMail/4.8.4 (Linux/3.2.0-23-lowlatency; KDE/4.8.4; x86_64; ; ) In-Reply-To: <83627b1eyk.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-SA-Exim-Connect-IP: 77.22.152.244 X-SA-Exim-Mail-From: jwalt@garni.ch X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mercenary.garni.ch X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED shortcircuit=no autolearn=disabled version=3.3.1 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-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Op den Dingsdag, de 18. September 2012 Klock 19:19:15 hett Eli Zaretski= i=20 schreven: > Can you see what happened in revision 104105? That was before the > previous image-handling code was modified into its present form, whic= h > originally made pbm images unavailable (that was fixed in 104186). > The question is, was the recipe in this bug slow or fast then. > Knowing that will probably give a hint in the right direction. Look at 104108. In a way, it is the reverse of my suggested patch. That= at=20 least explains something. --=20 CU =09J=F6rg From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=B6rg?= Walter , Juanma Barranquero Cc: 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13479888441112 (code B ref 12463); Tue, 18 Sep 2012 17:21:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 17:20:44 +0000 Received: from localhost ([127.0.0.1]:42073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE1TX-0000Hs-Lb for submit@debbugs.gnu.org; Tue, 18 Sep 2012 13:20:43 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:65329) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE1TV-0000Hb-8W for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 13:20:42 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAK00A002F71C00@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 20:18:58 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAK00ATA2RM1H20@a-mtaout21.012.net.il>; Tue, 18 Sep 2012 20:18:58 +0300 (IDT) Date: Tue, 18 Sep 2012 20:19:08 +0300 From: Eli Zaretskii In-reply-to: <17979218.71hQQLqaqS@queen> Message-id: <83392f1c6r.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: J=F6rg Walter > Date: Tue, 18 Sep 2012 18:26:45 +0200 >=20 > Op den Dingsdag, de 18. September 2012 Klock 19:19:15 hett Eli Zare= tskii=20 > schreven: > > Can you see what happened in revision 104105? That was before th= e > > previous image-handling code was modified into its present form, = which > > originally made pbm images unavailable (that was fixed in 104186)= . > > The question is, was the recipe in this bug slow or fast then. > > Knowing that will probably give a hint in the right direction. >=20 > Look at 104108. In a way, it is the reverse of my suggested patch. = That at=20 > least explains something. Right, that's why I asked Chong to test 104105. I guess you already find the answer to that: the cache that was removed for all the builds except w32. Juanma, can you take care of this, please? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13479896083731 (code B ref 12463); Tue, 18 Sep 2012 17:34:02 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 17:33:28 +0000 Received: from localhost ([127.0.0.1]:42100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE1fs-0000y8-Jq for submit@debbugs.gnu.org; Tue, 18 Sep 2012 13:33:28 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:51312) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE1fp-0000xs-QP for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 13:33:26 -0400 Received: by wibhr14 with SMTP id hr14so3526108wib.15 for <12463@debbugs.gnu.org>; Tue, 18 Sep 2012 10:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=s8A/+5vcNnPfyNr7jSM05Xx8xNuPLve8eBIw4ChIsUA=; b=0TyAmt7hCSbYC179mJeWLs5O9BEmkX8xxMXs65XpHtyDL9puZIyPhG8xmlXnuLpupL wUtm3Ty6Wg6zjYZs3bHmlL/2M6hgdH3fWYuPt8RhKmsStfQ71iJC3vIpeztZbnwgeOP6 twn/80rWwdNEaXyAJ0Cc3v++SmkEH/SfVdsaBxrL1bOSEiuh2t2hNXJXdSAKwaBLrJPf nI+UlopLwrVcyKgb8Yj+xcWrUy9sJpo30kC8CLYNePCFv8nkX5aPlrUmcct1guOGnURO YLnxCzhbZQcpSHO9jYiMDWx6phmWmDHdcElE8Gsfiq5zIBQ1ZUedrpRdOxEAckCKm2sn zNDA== Received: by 10.180.107.163 with SMTP id hd3mr932775wib.19.1347989523429; Tue, 18 Sep 2012 10:32:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.203.133 with HTTP; Tue, 18 Sep 2012 10:31:22 -0700 (PDT) In-Reply-To: <83392f1c6r.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> <83392f1c6r.fsf@gnu.org> From: Juanma Barranquero Date: Tue, 18 Sep 2012 19:31:22 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, Sep 18, 2012 at 7:19 PM, Eli Zaretskii wrote: > Juanma, can you take care of this, please? Assuming it can wait a few days, yes. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Sep 2012 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13479984921619 (code B ref 12463); Tue, 18 Sep 2012 20:02:01 +0000 Received: (at 12463) by debbugs.gnu.org; 18 Sep 2012 20:01:32 +0000 Received: from localhost ([127.0.0.1]:42263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE3z7-0000Pu-0V for submit@debbugs.gnu.org; Tue, 18 Sep 2012 16:01:31 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:47083) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TE3z3-0000Pg-IH for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 16:01:27 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAK00A00A6PRV00@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 23:00:01 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAK00A3UA80RK30@a-mtaout21.012.net.il>; Tue, 18 Sep 2012 23:00:01 +0300 (IDT) Date: Tue, 18 Sep 2012 23:00:11 +0300 From: Eli Zaretskii In-reply-to: Message-id: <83zk4nyud0.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> <83392f1c6r.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Tue, 18 Sep 2012 19:31:22 +0200 > Cc: J=C3=B6rg Walter , 12463@debbugs.gnu.org >=20 > On Tue, Sep 18, 2012 at 7:19 PM, Eli Zaretskii wrote= : >=20 > > Juanma, can you take care of this, please? >=20 > Assuming it can wait a few days, yes. Since J=C3=B6rg published the solution, I don't see any special reaso= ns to hurry: anyone who needs it can apply the patches to their sandbox. Thanks. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2012 02:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134802203623745 (code B ref 12463); Wed, 19 Sep 2012 02:34:02 +0000 Received: (at 12463) by debbugs.gnu.org; 19 Sep 2012 02:33:56 +0000 Received: from localhost ([127.0.0.1]:42498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEA6s-0006Av-P1 for submit@debbugs.gnu.org; Tue, 18 Sep 2012 22:33:56 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:50867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEA6n-0006Ak-7e for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 22:33:50 -0400 Received: by wgbdt12 with SMTP id dt12so364552wgb.15 for <12463@debbugs.gnu.org>; Tue, 18 Sep 2012 19:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=lIcxgDYBgwQZxb9MamtIX+pwnJhGoM4Lytj9MuALZow=; b=trWjl3ZIlPnDZ8j7k5+R4LT2WEKSz2Jmd5OCAzT0OXvTIjUQFwIxtMBwb8Aam3FbFq usNlNW1wlG9S/J/koK1kImRAXbOnq8JvnM9DiTpeqDJH+xDuDDCXxgTo+zdqzRPAh16Q DRCJgByT3MrNjq3vk4BypOzLXca9l5S5/gzjc3EfFJPaObMLHcl/rhSHhJE3L1bjI1iF e11ymvLzpbmuEz9j4WL/dRt0+LBo9A10FTtjy5VtHW5/yi5LblHgMyuUmGE82BH6gMKj g+rJMzoiX9GumWKWAPo0gEMq3w6xgdBNDZ8DxEjZ7UbnKs+hRFVp7ScFJ21i4gDk81dV k67A== Received: by 10.180.85.167 with SMTP id i7mr3409993wiz.8.1348021944814; Tue, 18 Sep 2012 19:32:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.203.133 with HTTP; Tue, 18 Sep 2012 19:31:44 -0700 (PDT) In-Reply-To: <83zk4nyud0.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> <83392f1c6r.fsf@gnu.org> <83zk4nyud0.fsf@gnu.org> From: Juanma Barranquero Date: Wed, 19 Sep 2012 04:31:44 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, Sep 18, 2012 at 10:00 PM, Eli Zaretskii wrote: > Since J=C3=B6rg published the solution, I don't see any special reasons t= o > hurry: anyone who needs it can apply the patches to their sandbox. J=C3=B6rg's fix solves the reported bug, but he's apparently unaware that Vlibrary_cache is not just used for images, so renaming it to loaded_image_types and making it private to image.c is a no-no. The patch is trivial (J=C3=B6rg's deletion of Windows-specific #ifdef's, plus moving the declaration of Vlibrary_cache outside w32.c/h and to a more general file). But I'm not sure where to put it; image.c is not safe because you can have a non-HAVE_WINDOW_SYSTEM build supporting libxml2 or GnuTLS. Suggestions? Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2012 03:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134802355425966 (code B ref 12463); Wed, 19 Sep 2012 03:00:01 +0000 Received: (at 12463) by debbugs.gnu.org; 19 Sep 2012 02:59:14 +0000 Received: from localhost ([127.0.0.1]:42519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEAVO-0006kk-HG for submit@debbugs.gnu.org; Tue, 18 Sep 2012 22:59:14 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:47748) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEAVL-0006kc-TQ for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 22:59:12 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAK00C00TCBP800@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Wed, 19 Sep 2012 05:57:47 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAK00CXQTKBP620@a-mtaout21.012.net.il>; Wed, 19 Sep 2012 05:57:47 +0300 (IDT) Date: Wed, 19 Sep 2012 05:57:57 +0300 From: Eli Zaretskii In-reply-to: Message-id: <83sjaezpl6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> <83392f1c6r.fsf@gnu.org> <83zk4nyud0.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Wed, 19 Sep 2012 04:31:44 +0200 > Cc: jwalt@garni.ch, 12463@debbugs.gnu.org >=20 > The patch is trivial (J=C3=B6rg's deletion of Windows-specific #ifd= ef's, > plus moving the declaration of Vlibrary_cache outside w32.c/h and t= o a > more general file). But I'm not sure where to put it; image.c is no= t > safe because you can have a non-HAVE_WINDOW_SYSTEM build supporting > libxml2 or GnuTLS. >=20 > Suggestions? emacs.c? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Sep 2012 03:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134802392226509 (code B ref 12463); Wed, 19 Sep 2012 03:06:01 +0000 Received: (at 12463) by debbugs.gnu.org; 19 Sep 2012 03:05:22 +0000 Received: from localhost ([127.0.0.1]:42523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEAbK-0006tW-6Q for submit@debbugs.gnu.org; Tue, 18 Sep 2012 23:05:22 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:56926) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEAbI-0006tO-9B for 12463@debbugs.gnu.org; Tue, 18 Sep 2012 23:05:21 -0400 Received: by wibhr14 with SMTP id hr14so3946819wib.15 for <12463@debbugs.gnu.org>; Tue, 18 Sep 2012 20:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mW9AwWVYrbRLj2USmk19qEWDKZV/Laoai/VEuRdLBM0=; b=qqBwWQb6wG88gH/SxTtKOafoJzCcZYcnkjYXWoCejH221EzjJLxNSZLmywXOE+7R01 g6q54aOJVyxosO2AS315tC6q8Ly+H7iCV5o7TJGaUoZ4xKJ0dydqiQb/brCSyPmuApj1 nXhkkQsXBY6ECMYxGDq/KiFb7dElqWOteo+FGuoa8f0oaIJMG11wj9e9XSqQaHC0OJID y8wMqx81yjkJoUFJSN+wiNC5JfJx6UJvtnOMI2PJlZJnC9P2rFb72bmLI8aAgnMlip/W Ujj3FVzx1OeTLQhSxoFCbAhmsTEbDnIHuLbazl/LHEzyP7MShaP+a1feiwtAfqa4d9Rf CEcA== Received: by 10.216.243.1 with SMTP id j1mr878342wer.29.1348023836058; Tue, 18 Sep 2012 20:03:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.203.133 with HTTP; Tue, 18 Sep 2012 20:03:15 -0700 (PDT) In-Reply-To: <83sjaezpl6.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <87d31jcqce.fsf@gnu.org> <83627b1eyk.fsf@gnu.org> <17979218.71hQQLqaqS@queen> <83392f1c6r.fsf@gnu.org> <83zk4nyud0.fsf@gnu.org> <83sjaezpl6.fsf@gnu.org> From: Juanma Barranquero Date: Wed, 19 Sep 2012 05:03:15 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, Sep 19, 2012 at 4:57 AM, Eli Zaretskii wrote: > emacs.c? Yes, I've come to the same conclusion. Working on it. Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 19 03:34:44 2012 Received: (at control) by debbugs.gnu.org; 19 Sep 2012 07:34:44 +0000 Received: from localhost ([127.0.0.1]:42797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEEnz-00077j-OZ for submit@debbugs.gnu.org; Wed, 19 Sep 2012 03:34:44 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:49730) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEEny-00077c-4K for control@debbugs.gnu.org; Wed, 19 Sep 2012 03:34:42 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TEEmb-0007cQ-IV for control@debbugs.gnu.org; Wed, 19 Sep 2012 03:33:17 -0400 Date: Wed, 19 Sep 2012 03:33:17 -0400 Message-Id: Subject: control message for bug 12463 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -7.4 (-------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.4 (-------) merge 12468 12463 From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Sep 2012 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?J=C3=B6rg?= Walter Cc: 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134818347926956 (code B ref 12463); Thu, 20 Sep 2012 23:25:02 +0000 Received: (at 12463) by debbugs.gnu.org; 20 Sep 2012 23:24:39 +0000 Received: from localhost ([127.0.0.1]:45822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEq6o-00070i-Pj for submit@debbugs.gnu.org; Thu, 20 Sep 2012 19:24:39 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:49367) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEq6m-00070b-NU for 12463@debbugs.gnu.org; Thu, 20 Sep 2012 19:24:37 -0400 Received: by wgbdt12 with SMTP id dt12so1907197wgb.15 for <12463@debbugs.gnu.org>; Thu, 20 Sep 2012 16:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Vf8MgdqlXgEeMSp0kQfR5+kqFqNqRl8tI4ZUd7iHOF0=; b=YG6xIMYZ7HUZcb3GoC/R+p06DD8O5blCA4VIKczmTvrCdaO6OOlnOnwJUg8adJMIHn BzuKzjOx4RF6u0SJ1OXMmRi5Mw0HGEC2crlOFPgNNsBSP2/nS7zWLM/JcEW3wAJdVsTF yzbdC8P8nfSO7IfB9Qp5BwOJSf9vDdCFM5ye2MzEu9yZgHvkXWr2/lg2Twe38+Rc1o8K I6YOME+OVGVBt+kx4yKRntHebpREF+hxdIXEAuj8BBFrmBtNAqNsEgJasZA7p537ssOr 8ZPIlMjjhJ/huWimcKx70gwSjWeouohto9GLy/jcccHSSXNlv+spiYwwxNPSyR9fIY0j YMtg== Received: by 10.216.207.226 with SMTP id n76mr1659544weo.138.1348183379832; Thu, 20 Sep 2012 16:22:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Thu, 20 Sep 2012 16:22:19 -0700 (PDT) In-Reply-To: <4023344.MyoQPQRfcJ@queen> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> From: Juanma Barranquero Date: Fri, 21 Sep 2012 01:22:19 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, Sep 18, 2012 at 6:18 PM, J=C3=B6rg Walter wrote: > The linked list `image_types' grows without bounds because > CHECK_LIB_AVAILABLE/define_image_type never checked if the given image ty= pe is > already in `image_types'. My lisp code triggered tons of `Finit_image_lib= rary' > calls. Since the list is searched linearly at some point, that explains t= he > run-time impact. > > I have no idea what was originally supposed to ensure `image_types' doesn= 't > include duplicate entries, so the patch may be way off... hope someone ac= tually > knows what is suppsed to go on there. What kind of duplicate entries image_types had? Were they mostly (or all) for pbm/xbm types? Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 03:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134819966817626 (code B ref 12463); Fri, 21 Sep 2012 03:55:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 03:54:28 +0000 Received: from localhost ([127.0.0.1]:45942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEuJv-0004aF-OX for submit@debbugs.gnu.org; Thu, 20 Sep 2012 23:54:27 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:51610) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEuJs-0004a6-GD for 12463@debbugs.gnu.org; Thu, 20 Sep 2012 23:54:25 -0400 Received: by pbbjt11 with SMTP id jt11so4304424pbb.3 for <12463@debbugs.gnu.org>; Thu, 20 Sep 2012 20:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=qMAZOrURU0snqgSC+hiB1+DKFLj5HdFmscKEaLR9v8w=; b=kk8JVmLubW2cCr+sR6FPNRwK4hnMRMCrT40vwysYPzQXRRtPzjwxC4xZ5HdZKzlsUm b25Jl2EixC5PkkcwVbC6H/rAlXfIVDs/2ShTvGCIioU46ekFFYw5onnFlsNmAyTRqvAx x80iU/tvd3pxjWJYXGWOJrs1RDu2aKWFRoA/6nM3SGEFCN8PR63ggsXlWuQB5VqMMRqo zy+pUtFLEhDHDdElnVM9OKt0qtQh0CV+gm90sj1VrhWqfprru/ukk1OtN9KCsjZ4qbnL +5LW9KRCZjlnDj/fCU17Pi91whE3qdUx4dJ4OE6kUptrk/f67suKtte/0QC/opXCXKWK bNwA== Received: by 10.68.240.7 with SMTP id vw7mr11805585pbc.152.1348199568986; Thu, 20 Sep 2012 20:52:48 -0700 (PDT) Received: from ulysses ([155.69.19.149]) by mx.google.com with ESMTPS id h8sm3446219pay.0.2012.09.20.20.52.45 (version=SSLv3 cipher=OTHER); Thu, 20 Sep 2012 20:52:47 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> Date: Fri, 21 Sep 2012 11:52:42 +0800 In-Reply-To: (Juanma Barranquero's message of "Fri, 21 Sep 2012 01:22:19 +0200") Message-ID: <87sjac1185.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: >> I have no idea what was originally supposed to ensure `image_types' >> doesn't include duplicate entries, so the patch may be way >> off... hope someone actually knows what is suppsed to go on there. > > What kind of duplicate entries image_types had? Were they mostly (or > all) for pbm/xbm types? No, the duplicates were for other image types other than pbm/xbm (in this case svg). The trouble, as J=C3=B6rg pointed out, is that define_image_types did not check for the prior existence of an image type before registering it again. An unfortunate oversight; I've committed a fix to the trunk. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 05:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134820627927291 (code B ref 12463); Fri, 21 Sep 2012 05:45:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 05:44:39 +0000 Received: from localhost ([127.0.0.1]:46008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEw2Y-000767-Po for submit@debbugs.gnu.org; Fri, 21 Sep 2012 01:44:39 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:53794) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEw2V-00075u-Ti for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 01:44:38 -0400 Received: by pbbjt11 with SMTP id jt11so4491109pbb.3 for <12463@debbugs.gnu.org>; Thu, 20 Sep 2012 22:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=VYUsxVWP5ViigDL6hHTyEx7MFbr0MKpodTO9qzTkAwc=; b=yUf2JSM27A9Jpo4qV1YxaNcZFFcJ5l+Thq+8WoTNh4tE65iTVzw/JtvKbGT7YanChU 9jkqweNnaa4CNmbSiJAZmAEHV8NlBTqoCt/HA29oSmIlKTmm8utdQlR5uNXy9D+mZX7c yKl7JOncnNYypf2NaI6czUERfoENU5rk6/n7BKQ4uX+YHQU1nHEWenN8srvAaOOXQrex rEcfTlsnqjGvPqzCTqSgkoifAnbZPc0tEYDg7XNrztGazOUn7GyB1fVNZJbOCZYAcL9O rlKY2kkL6BJ74zcdpWh2MM9jgV1TC/cn6IMfnEGt9hPmza/VjJpBrLCP2tFYa25+qK6u qvsA== Received: by 10.68.228.98 with SMTP id sh2mr12588244pbc.95.1348206179845; Thu, 20 Sep 2012 22:42:59 -0700 (PDT) Received: from ulysses ([155.69.19.149]) by mx.google.com with ESMTPS id qo8sm4615188pbb.19.2012.09.20.22.42.56 (version=SSLv3 cipher=OTHER); Thu, 20 Sep 2012 22:42:58 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> Date: Fri, 21 Sep 2012 13:42:53 +0800 In-Reply-To: <87sjac1185.fsf@gnu.org> (Chong Yidong's message of "Fri, 21 Sep 2012 11:52:42 +0800") Message-ID: <878vc4ylr6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Chong Yidong writes: >> What kind of duplicate entries image_types had? Were they mostly (or >> all) for pbm/xbm types? > > No, the duplicates were for other image types other than pbm/xbm (in > this case svg). The trouble, as J=C3=B6rg pointed out, is that > define_image_types did not check for the prior existence of an image > type before registering it again. An unfortunate oversight; I've > committed a fix to the trunk. On further inspection of Finit_image_library and friends, the current arrangement seems sub-optimal. We have a Lisp-visible function `init-image-library', which triggers loading of image types. This function is called by lookup_image_type, which afterwards scans the image_types linked list again. Please take a look at the following patch, which moves all the work done by Finit_image_library into lookup_image_type. This requires adding a LIBRARIES argument to lookup_image_type, with the same meaning as Finit_image_library and defaulting to Vdynamic_library_alist. Then Finit_image_library would be a rather simple wrapper around lookup_image_type. Other callers to lookup_image_type, such as redisplay looking up an image, would be unaffected. This patch also gets rid of the CHECK_LIB_AVAILABLE macro and replaces it using a new slot in struct image_type, which stores the initialization function for dynamic loading, if any. This patch is orthogonal to the issue of moving Vlibrary_cache outside w32. One difference in behavior is that it makes the Windows code scan Vlibrary_cache only after it has already failed to look for the image type in image_types, and is about to run the initialization function. I think this is a bit more straightforward. =3D=3D=3D modified file 'src/dispextern.h' *** src/dispextern.h 2012-09-13 02:21:28 +0000 --- src/dispextern.h 2012-09-21 05:15:36 +0000 *************** *** 2766,2771 **** --- 2766,2774 ---- /* Free resources of image IMG which is used on frame F. */ void (* free) (struct frame *f, struct image *img); =20=20 + /* Initialization function, or NULL if none. */ + int (* init) (Lisp_Object); +=20 /* Next in list of all supported image types. */ struct image_type *next; }; =3D=3D=3D modified file 'src/image.c' *** src/image.c 2012-09-21 03:52:23 +0000 --- src/image.c 2012-09-21 05:35:31 +0000 *************** *** 561,568 **** =20=20 /* Function prototypes. */ =20=20 ! static Lisp_Object define_image_type (struct image_type *type, int loaded= ); ! static struct image_type *lookup_image_type (Lisp_Object symbol); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); --- 561,568 ---- =20=20 /* Function prototypes. */ =20=20 ! static struct image_type *define_image_type (struct image_type *, Lisp_Ob= ject); ! static struct image_type *lookup_image_type (Lisp_Object, Lisp_Object); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); *************** *** 581,632 **** /* Define a new image type from TYPE. This adds a copy of TYPE to image_types and caches the loading status of TYPE. */ =20=20 ! static Lisp_Object ! define_image_type (struct image_type *type, int loaded) { ! Lisp_Object success; =20=20 ! if (!loaded) ! success =3D Qnil; ! else { ! struct image_type *p; ! Lisp_Object target_type =3D *(type->type); ! for (p =3D image_types; p; p =3D p->next) ! if (EQ (*(p->type), target_type)) ! return Qt; =20=20 /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p =3D xmalloc (sizeof *p); *p =3D *type; p->next =3D image_types; image_types =3D p; - success =3D Qt; } =20=20 ! CACHE_IMAGE_TYPE (*type->type, success); ! return success; ! } !=20 !=20 ! /* Look up image type SYMBOL, and return a pointer to its image_type ! structure. Value is null if SYMBOL is not a known image type. */ !=20 ! static inline struct image_type * ! lookup_image_type (Lisp_Object symbol) ! { ! struct image_type *type; !=20 ! /* We must initialize the image-type if it hasn't been already. */ ! if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) ! return 0; /* unimplemented */ !=20 ! for (type =3D image_types; type; type =3D type->next) ! if (EQ (symbol, *type->type)) ! break; !=20 ! return type; } =20=20 =20=20 --- 581,624 ---- /* Define a new image type from TYPE. This adds a copy of TYPE to image_types and caches the loading status of TYPE. */ =20=20 ! static struct image_type * ! define_image_type (struct image_type *type, Lisp_Object libraries) { ! struct image_type *p =3D NULL; ! Lisp_Object target_type =3D *type->type; ! int type_valid =3D 1; !=20 ! for (p =3D image_types; p; p =3D p->next) ! if (EQ (*p->type, target_type)) ! return p; =20=20 ! if (type->init) { ! #ifdef HAVE_NTGUI ! /* If we failed to load the library before, don't try again. */ ! Lisp_Object tested =3D Fassq (target_type, Vlibrary_cache); ! if (CONSP (tested) && NILP (XCDR (tested))) ! type_valid =3D 0; ! else ! #endif ! { ! /* If the load failed, avoid trying again. */ ! type_valid =3D (*type->init)(libraries); ! CACHE_IMAGE_TYPE (target_type, type_valid); ! } ! } =20=20 + if (type_valid) + { /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p =3D xmalloc (sizeof *p); *p =3D *type; p->next =3D image_types; image_types =3D p; } =20=20 ! return p; } =20=20 =20=20 *************** *** 653,659 **** if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type =3D lookup_image_type (XCAR (tem)); if (type) valid_p =3D type->valid_p (object); } --- 645,651 ---- if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type =3D lookup_image_type (XCAR (tem), Qnil); if (type) valid_p =3D type->valid_p (object); } *************** *** 986,992 **** =20=20 eassert (valid_image_p (spec)); img->dependencies =3D NILP (file) ? Qnil : list1 (file); ! img->type =3D lookup_image_type (image_spec_value (spec, QCtype, NULL)); eassert (img->type !=3D NULL); img->spec =3D spec; img->lisp_data =3D Qnil; --- 978,984 ---- =20=20 eassert (valid_image_p (spec)); img->dependencies =3D NILP (file) ? Qnil : list1 (file); ! img->type =3D lookup_image_type (image_spec_value (spec, QCtype, NULL),= Qnil); eassert (img->type !=3D NULL); img->spec =3D spec; img->lisp_data =3D Qnil; *************** *** 2262,2267 **** --- 2254,2260 ---- xbm_image_p, xbm_load, x_clear_image, + NULL, NULL }; =20=20 *************** *** 3059,3064 **** --- 3052,3062 ---- xpm_image_p, xpm_load, x_clear_image, + #ifdef HAVE_NTGUI + init_xpm_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 4981,4986 **** --- 4979,4985 ---- pbm_image_p, pbm_load, x_clear_image, + NULL, NULL }; =20=20 *************** *** 5395,5400 **** --- 5394,5404 ---- png_image_p, png_load, x_clear_image, + #ifdef HAVE_NTGUI + init_png_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 6047,6052 **** --- 6051,6061 ---- jpeg_image_p, jpeg_load, x_clear_image, + #ifdef HAVE_NTGUI + init_jpeg_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 6632,6637 **** --- 6641,6651 ---- tiff_image_p, tiff_load, x_clear_image, + #ifdef HAVE_NTGUI + init_tiff_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 7080,7085 **** --- 7094,7104 ---- gif_image_p, gif_load, gif_clear_image, + #ifdef HAVE_NTGUI + init_gif_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 7571,7576 **** --- 7590,7600 ---- imagemagick_image_p, imagemagick_load, imagemagick_clear_image, + #ifdef HAVE_NTGUI + init_imagemagick_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 8123,8128 **** --- 8147,8157 ---- svg_load, /* Handle to function to free sresources for SVG. */ x_clear_image, + #ifdef HAVE_NTGUI + init_svg_functions, + #else + NULL, + #endif /* An internal field to link to the next image type in a list of image types, will be filled in when registering the format. */ NULL *************** *** 8512,8517 **** --- 8541,8551 ---- gs_image_p, gs_load, gs_clear_image, + #ifdef HAVE_NTGUI + init_gs_functions, + #else + NULL, + #endif NULL }; =20=20 *************** *** 8774,8789 **** Initialization ***********************************************************************/ =20=20 - #ifdef HAVE_NTGUI - /* Image types that rely on external libraries are loaded dynamically - if the library is available. */ - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, init_lib_fn (libraries)) - #else - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, 1) - #endif /* HAVE_NTGUI */ -=20 DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2,= 2, 0, doc: /* Initialize image library implementing image type TYPE. Return non-nil if TYPE is a supported image type. --- 8808,8813 ---- *************** *** 8793,8853 **** of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! #ifdef HAVE_NTGUI ! /* Don't try to reload the library. */ ! Lisp_Object tested =3D Fassq (type, Vlibrary_cache); ! if (CONSP (tested)) ! return XCDR (tested); ! #endif =20=20 /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm) || EQ (type, Qxbm)) ! return Qt; =20=20 #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries); #endif =20=20 #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, librarie= s); #endif =20=20 #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, librarie= s); #endif =20=20 #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries); #endif =20=20 #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries); #endif =20=20 #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return CHECK_LIB_AVAILABLE (&svg_type, init_svg_functions, libraries); #endif =20=20 #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_funct= ions, ! libraries); #endif =20=20 #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries); #endif =20=20 ! /* If the type is not recognized, avoid testing it ever again. */ ! CACHE_IMAGE_TYPE (type, Qnil); ! return Qnil; } =20=20 void --- 8817,8883 ---- of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! struct image_type *p =3D lookup_image_type (type, libraries); ! return p ? *p->type : Qnil; ! } !=20 ! /* Look up image type SYMBOL, and return a pointer to its image_type ! structure. Value is null if SYMBOL is not a known image type. */ !=20 ! static struct image_type * ! lookup_image_type (Lisp_Object type, Lisp_Object libraries) ! { ! if (NILP (libraries)) ! libraries =3D Vdynamic_library_alist; =20=20 /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm)) ! return &pbm_type; !=20 ! if (EQ (type, Qxbm)) ! return &xbm_type; =20=20 #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return define_image_type (&xpm_type, libraries); #endif =20=20 #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return define_image_type (&jpeg_type, libraries); #endif =20=20 #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return define_image_type (&tiff_type, libraries); #endif =20=20 #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return define_image_type (&gif_type, libraries); #endif =20=20 #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return define_image_type (&png_type, libraries); #endif =20=20 #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return define_image_type (&svg_type, libraries); #endif =20=20 #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return define_image_type (&imagemagick_type, libraries); #endif =20=20 #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return define_image_type (&gs_type, libraries); #endif =20=20 ! return NULL; } =20=20 void From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13482108041432 (code B ref 12463); Fri, 21 Sep 2012 07:01:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 07:00:04 +0000 Received: from localhost ([127.0.0.1]:46037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TExDX-0000N1-0a for submit@debbugs.gnu.org; Fri, 21 Sep 2012 03:00:03 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:55299) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TExDT-0000MA-Nl for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 03:00:01 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MAO00600TT8MQ00@a-mtaout21.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 09:58:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAO006ZLU1AH380@a-mtaout21.012.net.il>; Fri, 21 Sep 2012 09:58:22 +0300 (IDT) Date: Fri, 21 Sep 2012 09:58:38 +0300 From: Eli Zaretskii In-reply-to: <87sjac1185.fsf@gnu.org> Message-id: <83vcf7yi8x.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Date: Fri, 21 Sep 2012 11:52:42 +0800 > Cc: J=C3=B6rg Walter , 12463@debbugs.gnu.org >=20 > Juanma Barranquero writes: >=20 > >> I have no idea what was originally supposed to ensure `image_typ= es' > >> doesn't include duplicate entries, so the patch may be way > >> off... hope someone actually knows what is suppsed to go on ther= e. > > > > What kind of duplicate entries image_types had? Were they mostly = (or > > all) for pbm/xbm types? >=20 > No, the duplicates were for other image types other than pbm/xbm (i= n > this case svg). Then how come the bug was triggered by having a pbm image in the header line? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13482129314474 (code B ref 12463); Fri, 21 Sep 2012 07:36:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 07:35:31 +0000 Received: from localhost ([127.0.0.1]:46068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TExlq-0001A6-MG for submit@debbugs.gnu.org; Fri, 21 Sep 2012 03:35:31 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:42397) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TExln-00019x-Ch for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 03:35:28 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAO00E00VHT6T00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 10:33:50 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAO00D7HVODRPA0@a-mtaout22.012.net.il>; Fri, 21 Sep 2012 10:33:50 +0300 (IDT) Date: Fri, 21 Sep 2012 10:34:05 +0300 From: Eli Zaretskii In-reply-to: <878vc4ylr6.fsf@gnu.org> Message-id: <83pq5fyglu.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Date: Fri, 21 Sep 2012 13:42:53 +0800 > Cc: J=C3=B6rg Walter , 12463@debbugs.gnu.org >=20 > Please take a look at the following patch, which moves all the work= done > by Finit_image_library into lookup_image_type. This requires addin= g a > LIBRARIES argument to lookup_image_type, with the same meaning as > Finit_image_library and defaulting to Vdynamic_library_alist. Then > Finit_image_library would be a rather simple wrapper around > lookup_image_type. Other callers to lookup_image_type, such as > redisplay looking up an image, would be unaffected. Thanks. Some comments below. > /* Define a new image type from TYPE. This adds a copy of TYPE t= o > image_types and caches the loading status of TYPE. */ The LIBRARIES argument should be documented in the commentary. > ! static struct image_type * > ! define_image_type (struct image_type *type, Lisp_Object libraries= ) > { Since LIBRARIES could now be Qnil, but this function cannot tolerate that, there should be an assertion to that effect, either here or in every type->init function. > ! #ifdef HAVE_NTGUI > ! /* If we failed to load the library before, don't try again= . */ > ! Lisp_Object tested =3D Fassq (target_type, Vlibrary_cache); > ! if (CONSP (tested) && NILP (XCDR (tested))) > ! =09type_valid =3D 0; > ! else > ! #endif > ! =09{ > ! =09 /* If the load failed, avoid trying again. */ > ! =09 type_valid =3D (*type->init)(libraries); > ! =09 CACHE_IMAGE_TYPE (target_type, type_valid); > ! =09} > ! } What will happen if 'tested' is not a cons cell? > of `dynamic-library-alist', which see). */) > (Lisp_Object type, Lisp_Object libraries) > { > ! struct image_type *p =3D lookup_image_type (type, libraries); > ! return p ? *p->type : Qnil; > ! } This changes the return value of init-image-library; is there a good reason for not returning Qt here instead of the type symbol? > ! /* Look up image type SYMBOL, and return a pointer to its image_t= ype > ! structure. Value is null if SYMBOL is not a known image type.= */ Again, LIBRARIES is not documented. Also, I believe we use NULL in caps elsewhere. And finally, the argument is called TYPE, not SYMBOL= . > ! static struct image_type * > ! lookup_image_type (Lisp_Object type, Lisp_Object libraries) > ! { > ! if (NILP (libraries)) > ! libraries =3D Vdynamic_library_alist; I can't say I like this "default". Why not always call lookup_image_type with Vdynamic_library_alist? For that matter, why not make lookup_image_type always use Vdynamic_library_alist without passing it through the call parameters? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821677310142 (code B ref 12463); Fri, 21 Sep 2012 08:40:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 08:39:33 +0000 Received: from localhost ([127.0.0.1]:46157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEylo-0002dW-C3 for submit@debbugs.gnu.org; Fri, 21 Sep 2012 04:39:33 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:38310) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEylT-0002d4-RP for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 04:39:25 -0400 Received: by weyx48 with SMTP id x48so1792557wey.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 01:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=LGD28a4udirZ8ysvnTV9lOL23xyUQXYkdaoDigv9AeM=; b=E9NEOk/8Saz05EJtebHt+M4AzzFEQ9VPlXNqkUJNRVZf9oc3bXf7gSoiSbPJgB5rRb hBAXGw4i7eKC3ljo3fUU5uz5jG+75xQD3dsgNV7PKVi6x1Zs4xyfFh+hLfbISYTD6Dey Do2DzxVV2au2ZCCQMEkwYIlYvJFe2KTLL4uxqCGxoZFR25Rrey++rI8J37Z/M+EzXw4q 1RmTISdY5eFkbTOlTzwGCIdPcMz0PrQ+EYF40oJNBqQfCC1Oi/ardlp+NUXLmz2iz7ef JWkxH9+9fheu2pUN34q8glw52iJTBELvWpcNGbFL9gEFeARl+nQ8NLEiminIAYWsNB8L 8C6A== Received: by 10.216.182.210 with SMTP id o60mr2294500wem.110.1348216654803; Fri, 21 Sep 2012 01:37:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Fri, 21 Sep 2012 01:36:54 -0700 (PDT) In-Reply-To: <87sjac1185.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 21 Sep 2012 10:36:54 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Sep 21, 2012 at 5:52 AM, Chong Yidong wrote: > No, the duplicates were for other image types other than pbm/xbm (in > this case svg). Aha. > The trouble, as J=C3=B6rg pointed out, is that > define_image_types did not check for the prior existence of an image > type before registering it again. Yes, that part I get. Eli and I were trying to understand why the bug was triggered by displaying a pbm image, then. > An unfortunate oversight; I've > committed a fix to the trunk. I had a patch ready... Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 09:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821880012982 (code B ref 12463); Fri, 21 Sep 2012 09:14:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 09:13:20 +0000 Received: from localhost ([127.0.0.1]:46187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzIU-0003NK-Fg for submit@debbugs.gnu.org; Fri, 21 Sep 2012 05:13:19 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:55251) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzIR-0003NB-Sy for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 05:13:16 -0400 Received: by wibhm6 with SMTP id hm6so1504886wib.15 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 02:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=aavFIuoZrkz3jGhF9Q160Yt2OH4uT1FYGnk/Te8F+yc=; b=cFvAApGyNQjKoIKB43H7Vfxb5RtRS64JS/rOhcPaFl/1DlUrn3eWgA+ORfyQw9QLAO 6AuDDMaBtBcnd6IkkXiRxTkr+fDLsVbAaC/bj8eIv7ZFBAB7M0ug7UjRwdLsCdPKOazw 5K99EzJLBtx3FiqV/+263ksSyI+4nGdQRvAcN3l8J2VNyFCh0R4K02brx+mZdP81v8zq XChyBuxJsUCluxl95qXxL+KK6btXWANRD09w2hb26UMm5tLbfr0D5DZViL7qdM4Azt9W FqySILooO+W+4sRQGPhKm4Yte3XVCUDiZTcuD/LpkcwE9qYN+fy3IUZ8b+T7NztRX5sE 5w6w== Received: by 10.216.5.213 with SMTP id 63mr2665456wel.20.1348218697682; Fri, 21 Sep 2012 02:11:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Fri, 21 Sep 2012 02:10:57 -0700 (PDT) In-Reply-To: <878vc4ylr6.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 21 Sep 2012 11:10:57 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Sep 21, 2012 at 7:42 AM, Chong Yidong wrote: > *************** > *** 3059,3064 **** > --- 3052,3062 ---- > xpm_image_p, > xpm_load, > x_clear_image, > + #ifdef HAVE_NTGUI > + init_xpm_functions, > + #else > + NULL, > + #endif > NULL > }; > > *************** Additionally to Eli's comments, the functions init_*_functions are defined after being used to initialize the struct, so it fails: image.c:3056:3: error: 'init_xpm_functions' undeclared here (not in a function) image.c:5398:3: error: 'init_png_functions' undeclared here (not in a function) image.c:6055:3: error: 'init_jpeg_functions' undeclared here (not in a function) image.c:6645:3: error: 'init_tiff_functions' undeclared here (not in a function) image.c:7098:3: error: 'init_gif_functions' undeclared here (not in a function) You'll have to move them around. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 09:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821880212995 (code B ref 12463); Fri, 21 Sep 2012 09:14:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 09:13:22 +0000 Received: from localhost ([127.0.0.1]:46190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzIY-0003NY-3d for submit@debbugs.gnu.org; Fri, 21 Sep 2012 05:13:22 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:63692) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzIW-0003NR-HT for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 05:13:21 -0400 Received: by pbbjt11 with SMTP id jt11so4867001pbb.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 02:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=tvnwX4tvH1Dxp8r6L4jJIjnnwZK9MUYMfpcwnOmIxbA=; b=Ezal6K8R8irAVXO7LpeK2HV93hFYIe0yUYloiGOtwXLdxW+8mO/m5H1vzloK3PK9tw s7Gt9cANygolDx2JL0KC4YhcHnb3G5eYrp/RMrj5j5HlQ3wshEpsphYSTkH7atx8E8E2 ii82JF2/dDqDVBhUqKOY6sp/xdKb2LbZKlxD34L8HP8jifvM+A6fl0136A6PowLAl1YL OtzRD8yWqhpxMCkRnrh+ESJ5Is5BXpsG7k6nzAsw0spOR03HRGAv+5XAx2mFQhP1G5CL ys076QGQTctIhKc+Qn25GcN1fq10bd2QxYuHlNT+YGQFFVCXeX6ZEnl00BO+Ugcv65LO baMA== Received: by 10.68.217.202 with SMTP id pa10mr14010065pbc.15.1348218704048; Fri, 21 Sep 2012 02:11:44 -0700 (PDT) Received: from ulysses ([155.69.19.149]) by mx.google.com with ESMTPS id ou1sm4865063pbb.24.2012.09.21.02.11.40 (version=SSLv3 cipher=OTHER); Fri, 21 Sep 2012 02:11:43 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> Date: Fri, 21 Sep 2012 17:11:37 +0800 In-Reply-To: (Juanma Barranquero's message of "Fri, 21 Sep 2012 10:36:54 +0200") Message-ID: <87haqrd9km.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: >> An unfortunate oversight; I've >> committed a fix to the trunk. > > I had a patch ready... My apologies. I assumed, from your previous messages, that you were working on something orthogonal (moving the library cache stuff out of w32). From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 09:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821919813584 (code B ref 12463); Fri, 21 Sep 2012 09:20:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 09:19:58 +0000 Received: from localhost ([127.0.0.1]:46207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzOv-0003X3-JG for submit@debbugs.gnu.org; Fri, 21 Sep 2012 05:19:57 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38164) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzOt-0003Wv-3K for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 05:19:56 -0400 Received: by wibhm6 with SMTP id hm6so1510124wib.15 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 02:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=EMa2Qvnpf0CP82C8GGiUuWDfV70/Py8mpkX3iZgkO64=; b=D9oQPnLteNpZwTKleUjrsuJyRtmERrwgEo/YnQ1oc7U13Ip4BxA4Gnknu4/gDZ2C/i 30KPRcl5RG+eZ2qtf9f0goYATd4vT7SikdCnarTFuReEwRjMbQxvuu37+JiO+R8F/+B0 MNx6rYs2IcJidNFSuZuGsg2e6Vz9gwQl2KPYFgAVcTutvkj/JmK+GHwLylk1u/vpESGJ dxtg4mX9+U8CjV43Be09dWllaaQMlEtHiXLcL+jHt51Hpb3tuBmf6NXrp1zCaJHlsv4z li902FTMQXirAlfND09ZvEmVfQmXA+DGkDbBGEJVO8QDT0kREqSJ6a0R9V+gSiZOvqvw 5byQ== Received: by 10.216.195.209 with SMTP id p59mr573918wen.138.1348219098323; Fri, 21 Sep 2012 02:18:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Fri, 21 Sep 2012 02:17:38 -0700 (PDT) In-Reply-To: <87haqrd9km.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <87haqrd9km.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 21 Sep 2012 11:17:38 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Sep 21, 2012 at 11:11 AM, Chong Yidong wrote: > I assumed, from your previous messages, that you were > working on something orthogonal (moving the library cache stuff out of > w32). Both. But your fix is better than mine, so no worries. Anyway, what I was doing to move Vlibrary_cache out of w32 is affected by your patch, so I'd be happy if you could also fix that. The main issue is making sure that dynamic loading can be used before dumping, but the dumped Vlibrary_cache and image_types do not get dumped with entries that would not be relevant afterwards (that's could be an issue on Windows). Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 09:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821956314102 (code B ref 12463); Fri, 21 Sep 2012 09:27:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 09:26:03 +0000 Received: from localhost ([127.0.0.1]:46212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzUp-0003fO-FV for submit@debbugs.gnu.org; Fri, 21 Sep 2012 05:26:03 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:34248) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEzUm-0003ez-Od for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 05:26:01 -0400 Received: by pbbjt11 with SMTP id jt11so4891446pbb.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 02:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=eWk3Ic0cqOTXz1aZO0cGvL4u7/Ki66qFi+5T7OjcTAQ=; b=FgVb7rEyojCVThO9L39W+t6IIPSM4fQJt0A+Ggdln81TCq0XTZm1GI/ePYaexDICvG imQcgAgpksLQJHxUQe4AWPuQ9jCtEYBq4V82U6wboYzoOtFN4Cqlm9JS1EqHTYMUT8+2 T+7AFA9e0zZmZz6+LfH0yZtYPn53SJGQM00jZ5n9ryQDNDZh+TVV9C7Yt11vBqEWUXor 7qc6p9chaRn5GgJugQZJsP0gs41hFZSxek0KqE/bYMj9nqdvcqm7aFi9TKhy5DhYZwua YP11TnyffxsWUuwqYjXSuIY0aFk7IZRJKEl+3j3AwaOso+Bxg3stIgBYvFfCHp20EDMM udrQ== Received: by 10.66.75.105 with SMTP id b9mr11701414paw.58.1348219464091; Fri, 21 Sep 2012 02:24:24 -0700 (PDT) Received: from ulysses ([155.69.19.149]) by mx.google.com with ESMTPS id bj7sm3861719pab.24.2012.09.21.02.24.20 (version=SSLv3 cipher=OTHER); Fri, 21 Sep 2012 02:24:22 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> Date: Fri, 21 Sep 2012 17:24:17 +0800 In-Reply-To: <83pq5fyglu.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2012 10:34:05 +0300") Message-ID: <87d31fd8zi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: >> ! #ifdef HAVE_NTGUI >> ! /* If we failed to load the library before, don't try again. */ >> ! Lisp_Object tested = Fassq (target_type, Vlibrary_cache); >> ! if (CONSP (tested) && NILP (XCDR (tested))) >> ! type_valid = 0; >> ! else >> ! #endif >> ! { >> ! /* If the load failed, avoid trying again. */ >> ! type_valid = (*type->init)(libraries); >> ! CACHE_IMAGE_TYPE (target_type, type_valid); >> ! } >> ! } > > What will happen if 'tested' is not a cons cell? If `tested' is not a cons cell, it must be nil, and the code proceeds with the library initialization. >> of `dynamic-library-alist', which see). */) >> (Lisp_Object type, Lisp_Object libraries) >> { >> ! struct image_type *p = lookup_image_type (type, libraries); >> ! return p ? *p->type : Qnil; >> ! } > > This changes the return value of init-image-library; is there a good > reason for not returning Qt here instead of the type symbol? No good reason; we could return Qt here. >> ! /* Look up image type SYMBOL, and return a pointer to its image_type >> ! structure. Value is null if SYMBOL is not a known image type. */ > > Again, LIBRARIES is not documented. Also, I believe we use NULL in > caps elsewhere. And finally, the argument is called TYPE, not SYMBOL. Thanks. >> ! static struct image_type * >> ! lookup_image_type (Lisp_Object type, Lisp_Object libraries) >> ! { >> ! if (NILP (libraries)) >> ! libraries = Vdynamic_library_alist; > > I can't say I like this "default". Why not always call > lookup_image_type with Vdynamic_library_alist? For that matter, why > not make lookup_image_type always use Vdynamic_library_alist without > passing it through the call parameters? This is simply following the existing practice of Finit_image_library. I don't know why that function accepts a LIBRARIES argument, rather than just making callers bind Vdynamic_library_alist. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: =?UTF-8?Q?J=C3=B6rg?= Walter , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134822179017330 (code B ref 12463); Fri, 21 Sep 2012 10:04:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 10:03:10 +0000 Received: from localhost ([127.0.0.1]:46249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF04i-0004VR-KL for submit@debbugs.gnu.org; Fri, 21 Sep 2012 06:03:10 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:50705) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF04e-0004VH-Me for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 06:03:06 -0400 Received: by pbbjt11 with SMTP id jt11so4957754pbb.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 03:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=PhRJK6Rc6L8vsA99NjFihASke6Xm2EaZc4+M4PD2h7I=; b=CWKQWXDzETfnbBhhvtFRDFVnET/G2sVQbnVzBepA2d6v3yIvmFwUNfL0KGuzuuuP90 8x+VCHc3lu6E4J+VyvrPWk10N9m0IK2NFxx0P0gTIPq16gJgXDYRErXMu0Voao3Ii3tu venZ4Yvwu94jjgSU0EZpXZXeloG/NxW03K/vXCUOJzQU45qSwMhOpjkPIJVEWpBVTuNk LoaSoi3+uOKG9bimDeP0vCF1cYOw8nXPcZEc9VE5m7DjvWpGgTiDcxQsmqn6nuh72WJY jakyI6pspPqMZEmQVZVHXI6/2qRoltWoASCh0eEAE+VO370mTZXUsSzjAn2AWaiPhtBl C6gw== Received: by 10.68.204.169 with SMTP id kz9mr14177631pbc.39.1348221687480; Fri, 21 Sep 2012 03:01:27 -0700 (PDT) Received: from ulysses ([155.69.19.149]) by mx.google.com with ESMTPS id sr3sm4919921pbc.44.2012.09.21.03.01.23 (version=SSLv3 cipher=OTHER); Fri, 21 Sep 2012 03:01:26 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> Date: Fri, 21 Sep 2012 18:01:19 +0800 In-Reply-To: (Juanma Barranquero's message of "Fri, 21 Sep 2012 11:10:57 +0200") Message-ID: <87r4pvitjk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Juanma Barranquero writes: > Additionally to Eli's comments, the functions init_*_functions are > defined after being used to initialize the struct, so it fails: > > You'll have to move them around. Thanks. Fixed in the attached patch, which also addresses Eli's other comments. Please take a look again. > Anyway, what I was doing to move Vlibrary_cache out of w32 is affected > by your patch, so I'd be happy if you could also fix that. The main > issue is making sure that dynamic loading can be used before dumping, > but the dumped Vlibrary_cache and image_types do not get dumped with > entries that would not be relevant afterwards (that's could be an > issue on Windows). As far as I can tell, my patch should not change anything in this regard, except that when you move Vlibrary_cache out of w32, you can also get rid of the #ifdef NTGUI in define_image_type. Eli Zaretskii writes: > Since LIBRARIES could now be Qnil, but this function cannot tolerate > that, there should be an assertion to that effect, either here or in > every type->init function. Passing a nil LIBRARIES argument causes nil to be passed to w32_delayed_load, which AFAICT is safe; w32_delayed_load deals with nil just fine, as a no-op. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=image.patch === modified file 'src/dispextern.h' *** src/dispextern.h 2012-09-13 02:21:28 +0000 --- src/dispextern.h 2012-09-21 09:29:26 +0000 *************** *** 2766,2771 **** --- 2766,2775 ---- /* Free resources of image IMG which is used on frame F. */ void (* free) (struct frame *f, struct image *img); + /* Initialization function (used for dynamic loading of image + libraries on Windows), or NULL if none. */ + int (* init) (Lisp_Object); + /* Next in list of all supported image types. */ struct image_type *next; }; === modified file 'src/image.c' *** src/image.c 2012-09-21 03:52:23 +0000 --- src/image.c 2012-09-21 09:47:34 +0000 *************** *** 561,568 **** /* Function prototypes. */ ! static Lisp_Object define_image_type (struct image_type *type, int loaded); ! static struct image_type *lookup_image_type (Lisp_Object symbol); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); --- 561,568 ---- /* Function prototypes. */ ! static struct image_type *define_image_type (struct image_type *, Lisp_Object); ! static struct image_type *lookup_image_type (Lisp_Object, Lisp_Object); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); *************** *** 579,632 **** do { Vimage_types = Fcons (type, Vimage_types); } while (0) /* Define a new image type from TYPE. This adds a copy of TYPE to ! image_types and caches the loading status of TYPE. */ ! static Lisp_Object ! define_image_type (struct image_type *type, int loaded) { ! Lisp_Object success; ! if (!loaded) ! success = Qnil; ! else { ! struct image_type *p; ! Lisp_Object target_type = *(type->type); ! for (p = image_types; p; p = p->next) ! if (EQ (*(p->type), target_type)) ! return Qt; /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p = xmalloc (sizeof *p); *p = *type; p->next = image_types; image_types = p; - success = Qt; } ! CACHE_IMAGE_TYPE (*type->type, success); ! return success; ! } ! ! ! /* Look up image type SYMBOL, and return a pointer to its image_type ! structure. Value is null if SYMBOL is not a known image type. */ ! ! static inline struct image_type * ! lookup_image_type (Lisp_Object symbol) ! { ! struct image_type *type; ! ! /* We must initialize the image-type if it hasn't been already. */ ! if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) ! return 0; /* unimplemented */ ! ! for (type = image_types; type; type = type->next) ! if (EQ (symbol, *type->type)) ! break; ! ! return type; } --- 579,629 ---- do { Vimage_types = Fcons (type, Vimage_types); } while (0) /* Define a new image type from TYPE. This adds a copy of TYPE to ! image_types and caches the loading status of TYPE. ! LIBRARIES is an alist associating dynamic libraries to external ! files implementing them, which is passed to the image library ! initialization function if necessary. A nil value defaults to ! Vdynamic_library_alist. */ ! ! static struct image_type * ! define_image_type (struct image_type *type, Lisp_Object libraries) { ! struct image_type *p = NULL; ! Lisp_Object target_type = *type->type; ! int type_valid = 1; ! for (p = image_types; p; p = p->next) ! if (EQ (*p->type, target_type)) ! return p; ! ! if (type->init) { ! #ifdef HAVE_NTGUI ! /* If we failed to load the library before, don't try again. */ ! Lisp_Object tested = Fassq (target_type, Vlibrary_cache); ! if (CONSP (tested) && NILP (XCDR (tested))) ! type_valid = 0; ! else ! #endif ! { ! /* If the load failed, avoid trying again. */ ! type_valid = (*type->init)(libraries); ! CACHE_IMAGE_TYPE (target_type, type_valid); ! } ! } + if (type_valid) + { /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p = xmalloc (sizeof *p); *p = *type; p->next = image_types; image_types = p; } ! return p; } *************** *** 653,659 **** if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type = lookup_image_type (XCAR (tem)); if (type) valid_p = type->valid_p (object); } --- 650,656 ---- if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type = lookup_image_type (XCAR (tem), Qnil); if (type) valid_p = type->valid_p (object); } *************** *** 986,992 **** eassert (valid_image_p (spec)); img->dependencies = NILP (file) ? Qnil : list1 (file); ! img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); eassert (img->type != NULL); img->spec = spec; img->lisp_data = Qnil; --- 983,989 ---- eassert (valid_image_p (spec)); img->dependencies = NILP (file) ? Qnil : list1 (file); ! img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL), Qnil); eassert (img->type != NULL); img->spec = spec; img->lisp_data = Qnil; *************** *** 2262,2267 **** --- 2259,2265 ---- xbm_image_p, xbm_load, x_clear_image, + NULL, NULL }; *************** *** 3051,3056 **** --- 3049,3060 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_xpm_functions (Lisp_Object); + #else + #define init_xpm_functions NULL + #endif + /* Structure describing the image type XPM. */ static struct image_type xpm_type = *************** *** 3059,3064 **** --- 3063,3069 ---- xpm_image_p, xpm_load, x_clear_image, + init_xpm_functions, NULL }; *************** *** 4981,4986 **** --- 4986,4992 ---- pbm_image_p, pbm_load, x_clear_image, + NULL, NULL }; *************** *** 5387,5392 **** --- 5393,5404 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_png_functions (Lisp_Object); + #else + #define init_png_functions NULL + #endif + /* Structure describing the image type `png'. */ static struct image_type png_type = *************** *** 5395,5400 **** --- 5407,5413 ---- png_image_p, png_load, x_clear_image, + init_png_functions, NULL }; *************** *** 6039,6044 **** --- 6052,6063 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_jpeg_functions (Lisp_Object); + #else + #define init_jpeg_functions NULL + #endif + /* Structure describing the image type `jpeg'. */ static struct image_type jpeg_type = *************** *** 6047,6052 **** --- 6066,6072 ---- jpeg_image_p, jpeg_load, x_clear_image, + init_jpeg_functions, NULL }; *************** *** 6624,6629 **** --- 6644,6655 ---- {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_tiff_functions (Lisp_Object); + #else + #define init_tiff_functions NULL + #endif + /* Structure describing the image type `tiff'. */ static struct image_type tiff_type = *************** *** 6632,6637 **** --- 6658,6664 ---- tiff_image_p, tiff_load, x_clear_image, + init_tiff_functions, NULL }; *************** *** 7072,7077 **** --- 7099,7110 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_gif_functions (Lisp_Object); + #else + #define init_gif_functions NULL + #endif + /* Structure describing the image type `gif'. */ static struct image_type gif_type = *************** *** 7080,7085 **** --- 7113,7119 ---- gif_image_p, gif_load, gif_clear_image, + init_gif_functions, NULL }; *************** *** 7562,7567 **** --- 7596,7607 ---- {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; + #ifdef HAVE_NTGUI + static int init_imagemagick_functions (Lisp_Object); + #else + #define init_imagemagick_functions NULL + #endif + /* Structure describing the image type for any image handled via ImageMagick. */ *************** *** 7571,7576 **** --- 7611,7617 ---- imagemagick_image_p, imagemagick_load, imagemagick_clear_image, + init_imagemagick_functions, NULL }; *************** *** 8109,8130 **** {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image functions. See struct image_type in dispextern.h. */ static struct image_type svg_type = { - /* An identifier showing that this is an image structure for the SVG format. */ &Qsvg, - /* Handle to a function that can be used to identify a SVG file. */ svg_image_p, - /* Handle to function used to load a SVG file. */ svg_load, - /* Handle to function to free sresources for SVG. */ x_clear_image, ! /* An internal field to link to the next image type in a list of ! image types, will be filled in when registering the format. */ NULL }; --- 8150,8172 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_svg_functions (Lisp_Object); + #else + #define init_svg_functions NULL + #endif + /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image functions. See struct image_type in dispextern.h. */ static struct image_type svg_type = { &Qsvg, svg_image_p, svg_load, x_clear_image, ! init_svg_functions, NULL }; *************** *** 8504,8509 **** --- 8546,8557 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_gs_functions (Lisp_Object); + #else + #define init_gs_functions NULL + #endif + /* Structure describing the image type `ghostscript'. */ static struct image_type gs_type = *************** *** 8512,8517 **** --- 8560,8566 ---- gs_image_p, gs_load, gs_clear_image, + init_gs_functions, NULL }; *************** *** 8774,8789 **** Initialization ***********************************************************************/ - #ifdef HAVE_NTGUI - /* Image types that rely on external libraries are loaded dynamically - if the library is available. */ - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, init_lib_fn (libraries)) - #else - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, 1) - #endif /* HAVE_NTGUI */ - DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, doc: /* Initialize image library implementing image type TYPE. Return non-nil if TYPE is a supported image type. --- 8823,8828 ---- *************** *** 8793,8853 **** of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! #ifdef HAVE_NTGUI ! /* Don't try to reload the library. */ ! Lisp_Object tested = Fassq (type, Vlibrary_cache); ! if (CONSP (tested)) ! return XCDR (tested); ! #endif /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm) || EQ (type, Qxbm)) ! return Qt; #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries); #endif #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, libraries); #endif #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, libraries); #endif #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries); #endif #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries); #endif #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return CHECK_LIB_AVAILABLE (&svg_type, init_svg_functions, libraries); #endif #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_functions, ! libraries); #endif #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries); #endif ! /* If the type is not recognized, avoid testing it ever again. */ ! CACHE_IMAGE_TYPE (type, Qnil); ! return Qnil; } void --- 8832,8902 ---- of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! return lookup_image_type (type, libraries) ? Qt : Qnil; ! } ! ! /* Look up image type TYPE, and return a pointer to its image_type ! structure. Return 0 if TYPE is not a known image type. ! ! LIBRARIES is an alist associating dynamic libraries to external ! files implementing them, which is passed to the image library ! initialization function if necessary. A nil value defaults to ! Vdynamic_library_alist. */ ! ! static struct image_type * ! lookup_image_type (Lisp_Object type, Lisp_Object libraries) ! { ! if (NILP (libraries)) ! libraries = Vdynamic_library_alist; /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm)) ! return &pbm_type; ! ! if (EQ (type, Qxbm)) ! return &xbm_type; #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return define_image_type (&xpm_type, libraries); #endif #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return define_image_type (&jpeg_type, libraries); #endif #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return define_image_type (&tiff_type, libraries); #endif #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return define_image_type (&gif_type, libraries); #endif #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return define_image_type (&png_type, libraries); #endif #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return define_image_type (&svg_type, libraries); #endif #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return define_image_type (&imagemagick_type, libraries); #endif #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return define_image_type (&gs_type, libraries); #endif ! return NULL; } void --=-=-=-- From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 10:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: Eli Zaretskii , jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134822461821531 (code B ref 12463); Fri, 21 Sep 2012 10:51:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 10:50:18 +0000 Received: from localhost ([127.0.0.1]:46287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF0oM-0005bD-9j for submit@debbugs.gnu.org; Fri, 21 Sep 2012 06:50:18 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:64175) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF0oI-0005b4-Hj for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 06:50:15 -0400 Received: by wgbdt12 with SMTP id dt12so2228126wgb.15 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 03:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=TAEQiR6ttLNQUPBsP8vr8Ey1E7iJkPqvEZdlvj6RSxg=; b=OZBB/0VRmKUux+eweK3BWGkkJZeOQTpqTYyij5K5Tv6j2gyB2uKyMdk+6xUM2iBSOG 9+YSj7Ja05foaAnaowMPByPkZV4G/DTCoY1t7oT5hnUnKdb2LPhMPA0xSBPaVNHKxd2o 7lEwORG5gsEydjYUV8OF4voiAWWz6KN4KKASqDDHzkF8cgnwN0qx7dp1s5w+s7b4jIng 462Z4pFZ3Lotc0Neg7J6g6kDQy1PUAnMd7RzF2kWLGQK9tGvAo7l8LVE13Z5v0T+P6r0 wYaeHkp5dm3yyZQf7lUErT56q0OZ5oGVN1MmJIIUMv0A3sZ7YbU0VtOlkKR2vWjsqz0r mW3g== Received: by 10.180.84.104 with SMTP id x8mr3698787wiy.20.1348224516874; Fri, 21 Sep 2012 03:48:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Fri, 21 Sep 2012 03:47:56 -0700 (PDT) In-Reply-To: <87d31fd8zi.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 21 Sep 2012 12:47:56 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Sep 21, 2012 at 11:24 AM, Chong Yidong wrote: > I don't know why that function accepts a LIBRARIES argument, rather than > just making callers bind Vdynamic_library_alist. That's what it did in the original design, but someone (Stefan, I think) asked that it was passed as an argument. I have always disliked that, as it seems highly unlikely that any other variable will ever be used. I'd be happy to see that argument removed. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 12:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero , Stefan Monnier Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13482308911622 (code B ref 12463); Fri, 21 Sep 2012 12:35:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 12:34:51 +0000 Received: from localhost ([127.0.0.1]:46549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF2RX-0000Q7-Ba for submit@debbugs.gnu.org; Fri, 21 Sep 2012 08:34:51 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:57850) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF2RU-0000Py-9A for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 08:34:49 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAP00G009F8ZP00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 15:33:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAP00GA29J7KD70@a-mtaout22.012.net.il>; Fri, 21 Sep 2012 15:33:08 +0300 (IDT) Date: Fri, 21 Sep 2012 15:33:24 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83fw6by2qz.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Fri, 21 Sep 2012 12:47:56 +0200 > Cc: Eli Zaretskii , jwalt@garni.ch, 12463@debbugs.gnu.org > > On Fri, Sep 21, 2012 at 11:24 AM, Chong Yidong wrote: > > > I don't know why that function accepts a LIBRARIES argument, rather than > > just making callers bind Vdynamic_library_alist. > > That's what it did in the original design, but someone (Stefan, I > think) asked that it was passed as an argument. I have always disliked > that, as it seems highly unlikely that any other variable will ever be > used. I'd be happy to see that argument removed. Well, then maybe Stefan could explain why he wanted it. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Juanma Barranquero , cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824560723323 (code B ref 12463); Fri, 21 Sep 2012 16:41:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 16:40:07 +0000 Received: from localhost ([127.0.0.1]:47325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6Gs-000647-0K for submit@debbugs.gnu.org; Fri, 21 Sep 2012 12:40:06 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:35364) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6Gp-000640-Uj for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 12:40:04 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q8LGcPeZ018388; Fri, 21 Sep 2012 12:38:25 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 5D581B404D; Fri, 21 Sep 2012 12:38:25 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> Date: Fri, 21 Sep 2012 12:38:25 -0400 In-Reply-To: <83fw6by2qz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2012 15:33:24 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) >> > I don't know why that function accepts a LIBRARIES argument, rather than >> > just making callers bind Vdynamic_library_alist. >> That's what it did in the original design, but someone (Stefan, I >> think) asked that it was passed as an argument. I have always disliked >> that, as it seems highly unlikely that any other variable will ever be >> used. I'd be happy to see that argument removed. > Well, then maybe Stefan could explain why he wanted it. Sorry, can't remember. Probably because I generally prefer passing arguments explicitly over passing them via dynamic binding. Stefan From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 17:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824678224954 (code B ref 12463); Fri, 21 Sep 2012 17:00:01 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 16:59:42 +0000 Received: from localhost ([127.0.0.1]:47329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6Zq-0006UR-F0 for submit@debbugs.gnu.org; Fri, 21 Sep 2012 12:59:42 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:65486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6Zn-0006UI-Sy for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 12:59:41 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MAP00A00LO8A200@a-mtaout20.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 19:57:50 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAP009LKLSES1A0@a-mtaout20.012.net.il>; Fri, 21 Sep 2012 19:57:50 +0300 (IDT) Date: Fri, 21 Sep 2012 19:58:07 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83a9wjxqhs.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Stefan Monnier > Cc: Juanma Barranquero , cyd@gnu.org, jwalt@garni.ch, > 12463@debbugs.gnu.org > Date: Fri, 21 Sep 2012 12:38:25 -0400 > > >> > I don't know why that function accepts a LIBRARIES argument, rather than > >> > just making callers bind Vdynamic_library_alist. > >> That's what it did in the original design, but someone (Stefan, I > >> think) asked that it was passed as an argument. I have always disliked > >> that, as it seems highly unlikely that any other variable will ever be > >> used. I'd be happy to see that argument removed. > > Well, then maybe Stefan could explain why he wanted it. > > Sorry, can't remember. Probably because I generally prefer passing > arguments explicitly over passing them via dynamic binding. We have gobs of functions in Emacs that access global variables like Vdynamic_library_alist. I don't think one more function will change anything. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824709925440 (code B ref 12463); Fri, 21 Sep 2012 17:05:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 17:04:59 +0000 Received: from localhost ([127.0.0.1]:47334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6ex-0006cG-2v for submit@debbugs.gnu.org; Fri, 21 Sep 2012 13:04:59 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:59437) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6ev-0006c9-2h for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 13:04:58 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MAP00C00LLTM400@a-mtaout23.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 20:03:18 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAP00CX8M1HC2B0@a-mtaout23.012.net.il>; Fri, 21 Sep 2012 20:03:18 +0300 (IDT) Date: Fri, 21 Sep 2012 20:03:34 +0300 From: Eli Zaretskii In-reply-to: <87r4pvitjk.fsf@gnu.org> Message-id: <838vc3xq8p.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Date: Fri, 21 Sep 2012 18:01:19 +0800 > Cc: J=F6rg Walter , 12463@debbugs.gnu.org >=20 > Thanks. Fixed in the attached patch, which also addresses Eli's ot= her > comments. Please take a look again. Thanks. > /* Define a new image type from TYPE. This adds a copy of TYPE t= o > ! image_types and caches the loading status of TYPE. > =20 > ! LIBRARIES is an alist associating dynamic libraries to externa= l > ! files implementing them, which is passed to the image library > ! initialization function if necessary. A nil value defaults to > ! Vdynamic_library_alist. */ > !=20 > ! static struct image_type * > ! define_image_type (struct image_type *type, Lisp_Object libraries= ) > { > ! struct image_type *p =3D NULL; > ! Lisp_Object target_type =3D *type->type; > ! int type_valid =3D 1; > =20 > ! for (p =3D image_types; p; p =3D p->next) > ! if (EQ (*p->type, target_type)) > ! return p; > !=20 > ! if (type->init) > { > ! #ifdef HAVE_NTGUI > ! /* If we failed to load the library before, don't try again= . */ > ! Lisp_Object tested =3D Fassq (target_type, Vlibrary_cache); > ! if (CONSP (tested) && NILP (XCDR (tested))) > ! =09type_valid =3D 0; > ! else > ! #endif > ! =09{ > ! =09 /* If the load failed, avoid trying again. */ > ! =09 type_valid =3D (*type->init)(libraries); > ! =09 CACHE_IMAGE_TYPE (target_type, type_valid); > ! =09} > ! } > =20 > + if (type_valid) > + { > /* Make a copy of TYPE to avoid a bus error in a dumped Ema= cs. > The initialized data segment is read-only. */ > p =3D xmalloc (sizeof *p); > *p =3D *type; > p->next =3D image_types; > image_types =3D p; > } > =20 > ! return p; > } Am I missing something, or will this really call the initialization function again and again and again? AFAIU, if an image's library is already in Vlibrary_cache, and the cdr of its association is non-nil, that means the initialization function was already called for the corresponding image type, and it returned non-zero. So there's no need to call it again. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Chong Yidong , jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824739125858 (code B ref 12463); Fri, 21 Sep 2012 17:10:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 17:09:51 +0000 Received: from localhost ([127.0.0.1]:47340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6je-0006j0-TK for submit@debbugs.gnu.org; Fri, 21 Sep 2012 13:09:51 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:34622) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF6jc-0006is-Dh for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 13:09:49 -0400 Received: by bkty12 with SMTP id y12so1857594bkt.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 10:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=9fQFxTJMNg889Zy7X2DGYpm4pVhqg/O/O3rnUsvY69o=; b=eMN7WqyStcUP/ysod27QzEW1PAkoeK115f5KKZ4P6T5xUOOvAWeUZ8ns9lOiWBWHWw 0ghujmsu5CXqNirjWjfAHamslkUfMgaMH2n38tpBUdYoMx9vT1OCFHOyRyOn08wrJwl7 qmvCahOZjW3cCdZl67+15rdtg7fANHOV3of/Uum+N3yyg4o1uiIqDcIdXD4DLz/JxQWK BaVhFomF9c2WfqCrFZgYypVB1D0oJbiuzWo9v9eyMhxYiPF0DphTwLc6JrPDXaMt2/tL mtUPvlAi89gytc6RngL/fdeuyUKPfWpfcbtz7tpBFWCeuYFOIzKW1RC7YNwVDJ3GLrCt 4lpg== Received: by 10.204.133.194 with SMTP id g2mr2557830bkt.13.1348247289252; Fri, 21 Sep 2012 10:08:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.41.201 with HTTP; Fri, 21 Sep 2012 10:07:28 -0700 (PDT) In-Reply-To: <838vc3xq8p.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 21 Sep 2012 19:07:28 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Fri, Sep 21, 2012 at 7:03 PM, Eli Zaretskii wrote: > Am I missing something, or will this really call the initialization > function again and again and again? AFAIU, if an image's library is > already in Vlibrary_cache, and the cdr of its association is non-nil, > that means the initialization function was already called for the > corresponding image type, and it returned non-zero. So there's no > need to call it again. In fact, if an image library is already in Vlibrary_cache, and the cdr is nil, that also means that the initialization function was called for that image type, if failed, and should never be called again. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824961329067 (code B ref 12463); Fri, 21 Sep 2012 17:47:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 17:46:53 +0000 Received: from localhost ([127.0.0.1]:47357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF7JV-0007Ym-DK for submit@debbugs.gnu.org; Fri, 21 Sep 2012 13:46:53 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:61551) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF7JT-0007Yf-Fq for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 13:46:52 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MAP00C00NOBUL00@a-mtaout23.012.net.il> for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 20:45:12 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAP00CJINZCQW50@a-mtaout23.012.net.il>; Fri, 21 Sep 2012 20:45:12 +0300 (IDT) Date: Fri, 21 Sep 2012 20:45:11 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83392bxobc.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Fri, 21 Sep 2012 19:07:28 +0200 > Cc: Chong Yidong , jwalt@garni.ch, 12463@debbugs.gnu.org > > On Fri, Sep 21, 2012 at 7:03 PM, Eli Zaretskii wrote: > > > Am I missing something, or will this really call the initialization > > function again and again and again? AFAIU, if an image's library is > > already in Vlibrary_cache, and the cdr of its association is non-nil, > > that means the initialization function was already called for the > > corresponding image type, and it returned non-zero. So there's no > > need to call it again. > > In fact, if an image library is already in Vlibrary_cache, and the cdr > is nil, that also means that the initialization function was called > for that image type, if failed, and should never be called again. That part is OK: if the cdr of the association is nil, the initialization function is not called. And I see now that image_types is searched before looking in Vlibrary_cache, so the answer to my question is "yes, I did miss something". IOW, Vlibrary_cache is only searched to detect a previous unsuccessful attempt to load the library, in which case we don't try again. Otherwise, the image type will either be found in image_types, or loaded by calling the initialization function. So I guess this is okay, sorry for the noise. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Sep 2012 20:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134825978411694 (code B ref 12463); Fri, 21 Sep 2012 20:37:02 +0000 Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 20:36:24 +0000 Received: from localhost ([127.0.0.1]:47573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF9xY-00032Y-1V for submit@debbugs.gnu.org; Fri, 21 Sep 2012 16:36:24 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:60597) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TF9xV-00032R-HJ for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 16:36:22 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q8LKYf3o014821; Fri, 21 Sep 2012 16:34:42 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CFFA2B404D; Fri, 21 Sep 2012 16:34:41 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> Date: Fri, 21 Sep 2012 16:34:41 -0400 In-Reply-To: <83a9wjxqhs.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2012 19:58:07 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) >> Sorry, can't remember. Probably because I generally prefer passing >> arguments explicitly over passing them via dynamic binding. > We have gobs of functions in Emacs that access global variables like > Vdynamic_library_alist. I don't think one more function will change > anything. The question is not "global or not" but "let-bound or not". If it's generally accessed as a global var, that's perfectly fine. If it's generally let-bound, I prefer an explicit argument. Stefan From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Juanma Barranquero , jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13482771284145 (code B ref 12463); Sat, 22 Sep 2012 01:26:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 01:25:28 +0000 Received: from localhost ([127.0.0.1]:47714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFETH-00014n-2L for submit@debbugs.gnu.org; Fri, 21 Sep 2012 21:25:28 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:63386) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFETE-00014f-13 for 12463@debbugs.gnu.org; Fri, 21 Sep 2012 21:25:26 -0400 Received: by pbbjt11 with SMTP id jt11so6458228pbb.3 for <12463@debbugs.gnu.org>; Fri, 21 Sep 2012 18:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=aljom/1yjiNPX6Ii+UfthjVwPeSQPWecff/oY0mOlCE=; b=1Dfak91ELJ9JA9OI8nnf0ByhKQHYiGf+9yQMH6I1CK0tmWa4ueHNWSY7N3FkmLD+Wi qWCpZqFrxiKiOT5ciQwxKd3OTBag4Dq1yWpL82z2tZQmK4/hwnofmvdLvkOrpX2d2td0 OinMLx1y6o1iyqtbJCdsuGrJsVsn/WxXAPOXglOQ3Jg8GXcEJKHar+1XwVwpD5vKEopA nnDjJjP19Jg4E/8luMXOxgPo/eFcZOFqukLjiFz7jnC6cvvAmaQAVHPSWfssvGyEXAVA 8KrsnIEsviQdmn6JjbwMq4G8HCaEZrp4UFUwqoXuQsKLNjilkFGDvWGfWh0JdqUwxMeW cRBg== Received: by 10.66.76.231 with SMTP id n7mr16930118paw.68.1348277023068; Fri, 21 Sep 2012 18:23:43 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id s4sm4908594paw.35.2012.09.21.18.23.39 (version=SSLv3 cipher=OTHER); Fri, 21 Sep 2012 18:23:41 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> Date: Sat, 22 Sep 2012 09:23:37 +0800 In-Reply-To: <83392bxobc.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2012 20:45:11 +0300") Message-ID: <87lig2q292.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Juanma helped me spot a few more errors in the patch off-list. Here's another iteration. I added a BLOCK_INPUT in define_image_type; this seems necessary because lookup_image_type can be called with input unblocked. If further testing does not turn up any issues, I'll commit it so that the Vlibrary_cache refactoring work can proceed. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=image.patch === modified file 'src/dispextern.h' *** src/dispextern.h 2012-09-13 02:21:28 +0000 --- src/dispextern.h 2012-09-21 09:29:26 +0000 *************** *** 2766,2771 **** --- 2766,2775 ---- /* Free resources of image IMG which is used on frame F. */ void (* free) (struct frame *f, struct image *img); + /* Initialization function (used for dynamic loading of image + libraries on Windows), or NULL if none. */ + int (* init) (Lisp_Object); + /* Next in list of all supported image types. */ struct image_type *next; }; === modified file 'src/image.c' *** src/image.c 2012-09-21 03:52:23 +0000 --- src/image.c 2012-09-22 01:19:13 +0000 *************** *** 561,568 **** /* Function prototypes. */ ! static Lisp_Object define_image_type (struct image_type *type, int loaded); ! static struct image_type *lookup_image_type (Lisp_Object symbol); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); --- 561,568 ---- /* Function prototypes. */ ! static struct image_type *define_image_type (struct image_type *, Lisp_Object); ! static struct image_type *lookup_image_type (Lisp_Object, Lisp_Object); static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); *************** *** 579,632 **** do { Vimage_types = Fcons (type, Vimage_types); } while (0) /* Define a new image type from TYPE. This adds a copy of TYPE to ! image_types and caches the loading status of TYPE. */ ! static Lisp_Object ! define_image_type (struct image_type *type, int loaded) ! { ! Lisp_Object success; ! if (!loaded) ! success = Qnil; ! else { ! struct image_type *p; ! Lisp_Object target_type = *(type->type); ! for (p = image_types; p; p = p->next) ! if (EQ (*(p->type), target_type)) ! return Qt; /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p = xmalloc (sizeof *p); *p = *type; p->next = image_types; image_types = p; - success = Qt; } ! CACHE_IMAGE_TYPE (*type->type, success); ! return success; ! } ! ! ! /* Look up image type SYMBOL, and return a pointer to its image_type ! structure. Value is null if SYMBOL is not a known image type. */ ! ! static inline struct image_type * ! lookup_image_type (Lisp_Object symbol) ! { ! struct image_type *type; ! ! /* We must initialize the image-type if it hasn't been already. */ ! if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) ! return 0; /* unimplemented */ ! ! for (type = image_types; type; type = type->next) ! if (EQ (symbol, *type->type)) ! break; ! ! return type; } --- 579,633 ---- do { Vimage_types = Fcons (type, Vimage_types); } while (0) /* Define a new image type from TYPE. This adds a copy of TYPE to ! image_types and caches the loading status of TYPE. ! LIBRARIES is an alist associating dynamic libraries to external ! files implementing them, which is passed to the image library ! initialization function if necessary. A nil value defaults to ! Vdynamic_library_alist. */ ! ! static struct image_type * ! define_image_type (struct image_type *type, Lisp_Object libraries) ! { ! struct image_type *p = NULL; ! Lisp_Object target_type = *type->type; ! int type_valid = 1; ! BLOCK_INPUT; ! ! for (p = image_types; p; p = p->next) ! if (EQ (*p->type, target_type)) ! goto done; ! ! if (type->init) { ! #ifdef HAVE_NTGUI ! /* If we failed to load the library before, don't try again. */ ! Lisp_Object tested = Fassq (target_type, Vlibrary_cache); ! if (CONSP (tested) && NILP (XCDR (tested))) ! type_valid = 0; ! else ! #endif ! { ! /* If the load failed, avoid trying again. */ ! type_valid = type->init (libraries); ! CACHE_IMAGE_TYPE (target_type, type_valid ? Qt : Qnil); ! } ! } + if (type_valid) + { /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. The initialized data segment is read-only. */ p = xmalloc (sizeof *p); *p = *type; p->next = image_types; image_types = p; } ! done: ! UNBLOCK_INPUT; ! return p; } *************** *** 653,659 **** if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type = lookup_image_type (XCAR (tem)); if (type) valid_p = type->valid_p (object); } --- 654,660 ---- if (CONSP (tem) && SYMBOLP (XCAR (tem))) { struct image_type *type; ! type = lookup_image_type (XCAR (tem), Qnil); if (type) valid_p = type->valid_p (object); } *************** *** 986,992 **** eassert (valid_image_p (spec)); img->dependencies = NILP (file) ? Qnil : list1 (file); ! img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); eassert (img->type != NULL); img->spec = spec; img->lisp_data = Qnil; --- 987,993 ---- eassert (valid_image_p (spec)); img->dependencies = NILP (file) ? Qnil : list1 (file); ! img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL), Qnil); eassert (img->type != NULL); img->spec = spec; img->lisp_data = Qnil; *************** *** 2262,2267 **** --- 2263,2269 ---- xbm_image_p, xbm_load, x_clear_image, + NULL, NULL }; *************** *** 3051,3056 **** --- 3053,3064 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_xpm_functions (Lisp_Object); + #else + #define init_xpm_functions NULL + #endif + /* Structure describing the image type XPM. */ static struct image_type xpm_type = *************** *** 3059,3064 **** --- 3067,3073 ---- xpm_image_p, xpm_load, x_clear_image, + init_xpm_functions, NULL }; *************** *** 4981,4986 **** --- 4990,4996 ---- pbm_image_p, pbm_load, x_clear_image, + NULL, NULL }; *************** *** 5387,5392 **** --- 5397,5408 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_png_functions (Lisp_Object); + #else + #define init_png_functions NULL + #endif + /* Structure describing the image type `png'. */ static struct image_type png_type = *************** *** 5395,5400 **** --- 5411,5417 ---- png_image_p, png_load, x_clear_image, + init_png_functions, NULL }; *************** *** 6039,6044 **** --- 6056,6067 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_jpeg_functions (Lisp_Object); + #else + #define init_jpeg_functions NULL + #endif + /* Structure describing the image type `jpeg'. */ static struct image_type jpeg_type = *************** *** 6047,6052 **** --- 6070,6076 ---- jpeg_image_p, jpeg_load, x_clear_image, + init_jpeg_functions, NULL }; *************** *** 6624,6629 **** --- 6648,6659 ---- {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_tiff_functions (Lisp_Object); + #else + #define init_tiff_functions NULL + #endif + /* Structure describing the image type `tiff'. */ static struct image_type tiff_type = *************** *** 6632,6637 **** --- 6662,6668 ---- tiff_image_p, tiff_load, x_clear_image, + init_tiff_functions, NULL }; *************** *** 7072,7077 **** --- 7103,7114 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_gif_functions (Lisp_Object); + #else + #define init_gif_functions NULL + #endif + /* Structure describing the image type `gif'. */ static struct image_type gif_type = *************** *** 7080,7085 **** --- 7117,7123 ---- gif_image_p, gif_load, gif_clear_image, + init_gif_functions, NULL }; *************** *** 7562,7567 **** --- 7600,7611 ---- {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; + #ifdef HAVE_NTGUI + static int init_imagemagick_functions (Lisp_Object); + #else + #define init_imagemagick_functions NULL + #endif + /* Structure describing the image type for any image handled via ImageMagick. */ *************** *** 7571,7576 **** --- 7615,7621 ---- imagemagick_image_p, imagemagick_load, imagemagick_clear_image, + init_imagemagick_functions, NULL }; *************** *** 8109,8130 **** {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image functions. See struct image_type in dispextern.h. */ static struct image_type svg_type = { - /* An identifier showing that this is an image structure for the SVG format. */ &Qsvg, - /* Handle to a function that can be used to identify a SVG file. */ svg_image_p, - /* Handle to function used to load a SVG file. */ svg_load, - /* Handle to function to free sresources for SVG. */ x_clear_image, ! /* An internal field to link to the next image type in a list of ! image types, will be filled in when registering the format. */ NULL }; --- 8154,8176 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_svg_functions (Lisp_Object); + #else + #define init_svg_functions NULL + #endif + /* Structure describing the image type `svg'. Its the same type of structure defined for all image formats, handled by emacs image functions. See struct image_type in dispextern.h. */ static struct image_type svg_type = { &Qsvg, svg_image_p, svg_load, x_clear_image, ! init_svg_functions, NULL }; *************** *** 8504,8509 **** --- 8550,8561 ---- {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; + #ifdef HAVE_NTGUI + static int init_gs_functions (Lisp_Object); + #else + #define init_gs_functions NULL + #endif + /* Structure describing the image type `ghostscript'. */ static struct image_type gs_type = *************** *** 8512,8517 **** --- 8564,8570 ---- gs_image_p, gs_load, gs_clear_image, + init_gs_functions, NULL }; *************** *** 8774,8789 **** Initialization ***********************************************************************/ - #ifdef HAVE_NTGUI - /* Image types that rely on external libraries are loaded dynamically - if the library is available. */ - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, init_lib_fn (libraries)) - #else - #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ - define_image_type (image_type, 1) - #endif /* HAVE_NTGUI */ - DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, doc: /* Initialize image library implementing image type TYPE. Return non-nil if TYPE is a supported image type. --- 8827,8832 ---- *************** *** 8793,8853 **** of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! #ifdef HAVE_NTGUI ! /* Don't try to reload the library. */ ! Lisp_Object tested = Fassq (type, Vlibrary_cache); ! if (CONSP (tested)) ! return XCDR (tested); ! #endif /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm) || EQ (type, Qxbm)) ! return Qt; #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries); #endif #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, libraries); #endif #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, libraries); #endif #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries); #endif #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries); #endif #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return CHECK_LIB_AVAILABLE (&svg_type, init_svg_functions, libraries); #endif #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_functions, ! libraries); #endif #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries); #endif ! /* If the type is not recognized, avoid testing it ever again. */ ! CACHE_IMAGE_TYPE (type, Qnil); ! return Qnil; } void --- 8836,8906 ---- of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { ! return lookup_image_type (type, libraries) ? Qt : Qnil; ! } ! ! /* Look up image type TYPE, and return a pointer to its image_type ! structure. Return 0 if TYPE is not a known image type. ! ! LIBRARIES is an alist associating dynamic libraries to external ! files implementing them, which is passed to the image library ! initialization function if necessary. A nil value defaults to ! Vdynamic_library_alist. */ ! ! static struct image_type * ! lookup_image_type (Lisp_Object type, Lisp_Object libraries) ! { ! if (NILP (libraries)) ! libraries = Vdynamic_library_alist; /* Types pbm and xbm are built-in and always available. */ ! if (EQ (type, Qpbm)) ! return define_image_type (&pbm_type, libraries); ! ! if (EQ (type, Qxbm)) ! return define_image_type (&xbm_type, libraries); #if defined (HAVE_XPM) || defined (HAVE_NS) if (EQ (type, Qxpm)) ! return define_image_type (&xpm_type, libraries); #endif #if defined (HAVE_JPEG) || defined (HAVE_NS) if (EQ (type, Qjpeg)) ! return define_image_type (&jpeg_type, libraries); #endif #if defined (HAVE_TIFF) || defined (HAVE_NS) if (EQ (type, Qtiff)) ! return define_image_type (&tiff_type, libraries); #endif #if defined (HAVE_GIF) || defined (HAVE_NS) if (EQ (type, Qgif)) ! return define_image_type (&gif_type, libraries); #endif #if defined (HAVE_PNG) || defined (HAVE_NS) if (EQ (type, Qpng)) ! return define_image_type (&png_type, libraries); #endif #if defined (HAVE_RSVG) if (EQ (type, Qsvg)) ! return define_image_type (&svg_type, libraries); #endif #if defined (HAVE_IMAGEMAGICK) if (EQ (type, Qimagemagick)) ! return define_image_type (&imagemagick_type, libraries); #endif #ifdef HAVE_GHOSTSCRIPT if (EQ (type, Qpostscript)) ! return define_image_type (&gs_type, libraries); #endif ! return NULL; } void *************** *** 8884,8892 **** DEFSYM (Qxbm, "xbm"); ADD_IMAGE_TYPE (Qxbm); - define_image_type (&xbm_type, 1); - define_image_type (&pbm_type, 1); - DEFSYM (Qcount, "count"); DEFSYM (Qextension_data, "extension-data"); DEFSYM (Qdelay, "delay"); --- 8937,8942 ---- --=-=-=-- From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.13482972306937 (code B ref 12463); Sat, 22 Sep 2012 07:01:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 07:00:30 +0000 Received: from localhost ([127.0.0.1]:47858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFJhS-0001nm-5y for submit@debbugs.gnu.org; Sat, 22 Sep 2012 03:00:30 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:37011) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFJhJ-0001nW-Dp for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 03:00:22 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAQ00300OGZIJ00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 09:58:34 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAQ00385OPJ5T70@a-mtaout22.012.net.il>; Sat, 22 Sep 2012 09:58:32 +0300 (IDT) Date: Sat, 22 Sep 2012 09:58:20 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83sjaawnlf.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Stefan Monnier > Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org > Date: Fri, 21 Sep 2012 16:34:41 -0400 > > >> Sorry, can't remember. Probably because I generally prefer passing > >> arguments explicitly over passing them via dynamic binding. > > We have gobs of functions in Emacs that access global variables like > > Vdynamic_library_alist. I don't think one more function will change > > anything. > > The question is not "global or not" but "let-bound or not". > If it's generally accessed as a global var, that's perfectly fine. > If it's generally let-bound, I prefer an explicit argument. Sorry, I don't follow. We are discussing C code, so how do you mean "let-bound"? If you mean by using specbind, then no, it isn't let-bound, it's a global variable that always has the same value as it had when the last cons cell was added to it. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134830312215392 (code B ref 12463); Sat, 22 Sep 2012 08:39:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 08:38:42 +0000 Received: from localhost ([127.0.0.1]:48019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFLEU-000408-7w for submit@debbugs.gnu.org; Sat, 22 Sep 2012 04:38:42 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:35088) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFLEO-0003zx-QJ for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 04:38:37 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MAQ00G00SYEEQ00@a-mtaout23.012.net.il> for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 11:36:50 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAQ00GOHT9D5NA0@a-mtaout23.012.net.il>; Sat, 22 Sep 2012 11:36:50 +0300 (IDT) Date: Sat, 22 Sep 2012 11:36:38 +0300 From: Eli Zaretskii In-reply-to: <87lig2q292.fsf@gnu.org> X-012-Sender: halo1@inter.net.il Message-id: <83k3vmwj1l.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: Juanma Barranquero , jwalt@garni.ch, 12463@debbugs.gnu.org > Date: Sat, 22 Sep 2012 09:23:37 +0800 > > ! #ifdef HAVE_NTGUI > ! /* If we failed to load the library before, don't try again. */ > ! Lisp_Object tested = Fassq (target_type, Vlibrary_cache); > ! if (CONSP (tested) && NILP (XCDR (tested))) > ! type_valid = 0; > ! else > ! #endif > ! { > ! /* If the load failed, avoid trying again. */ > ! type_valid = type->init (libraries); > ! CACHE_IMAGE_TYPE (target_type, type_valid ? Qt : Qnil); > ! } > ! } The last comment seems to be redundant, given the one before it. > *************** > *** 8884,8892 **** > DEFSYM (Qxbm, "xbm"); > ADD_IMAGE_TYPE (Qxbm); > > - define_image_type (&xbm_type, 1); > - define_image_type (&pbm_type, 1); Why are these two lines being removed, while the corresponding ADD_IMAGE_TYPE lines are not? Thanks. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 11:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134831207028298 (code B ref 12463); Sat, 22 Sep 2012 11:08:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 11:07:50 +0000 Received: from localhost ([127.0.0.1]:48127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFNYo-0007MI-0q for submit@debbugs.gnu.org; Sat, 22 Sep 2012 07:07:50 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:65061) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFNYi-0007M6-Ea for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 07:07:44 -0400 Received: by pbbjt11 with SMTP id jt11so7103235pbb.3 for <12463@debbugs.gnu.org>; Sat, 22 Sep 2012 04:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=hM9925KANEj9I+QxnlGB0aYDcH4GVva8uWGBIpi+QJE=; b=rBlgx+2Br/TX7tZozbx9qoIoy+F/oXw1A9vV1bciUfNof9hxvkIKK1Wvcv5SeMuWn7 zcQq2m9WVLHcFEtLA7Dg4GoSyYRwBy8IH8ExZiNcQ9y2uL3fJZHQZEqHEA+pQ6cXNURo vzL8KvbWTYEkmJXh8+qF/H3W9lNacT/nof9NeeUYLdug37BBzYtde5OCrINYEzUAeJiA cW80Spw+48Sy4TMwAfWk0Btg+Zale3xDKsFYd8D+/VM5ObZrLXt4JEpWYmWFuYOJnYQf ZHAja8uX9XAE+A3XE0Bbr13OGQru3SDafzsWy8UoRGa1pWTpklLmgywR85/sVdnH4/ND KlWA== Received: by 10.68.210.207 with SMTP id mw15mr22223845pbc.81.1348311957198; Sat, 22 Sep 2012 04:05:57 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id rv5sm1465758pbc.69.2012.09.22.04.05.54 (version=SSLv3 cipher=OTHER); Sat, 22 Sep 2012 04:05:55 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> Date: Sat, 22 Sep 2012 19:05:51 +0800 In-Reply-To: <83k3vmwj1l.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Sep 2012 11:36:38 +0300") Message-ID: <87haqqfhbk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: >> *************** >> *** 8884,8892 **** >> DEFSYM (Qxbm, "xbm"); >> ADD_IMAGE_TYPE (Qxbm); >> >> - define_image_type (&xbm_type, 1); >> - define_image_type (&pbm_type, 1); > > Why are these two lines being removed, while the corresponding > ADD_IMAGE_TYPE lines are not? This change moves define_image_type into lookup_image_type, so that these two image types are handled just like the other image types, for simplicity. The ADD_IMAGE_TYPE stuff is also done for the non xmb/pbm image types. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 11:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.1348312847375 (code B ref 12463); Sat, 22 Sep 2012 11:21:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 11:20:47 +0000 Received: from localhost ([127.0.0.1]:48163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFNlL-00005v-7t for submit@debbugs.gnu.org; Sat, 22 Sep 2012 07:20:47 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:39662) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFNlF-00005l-Ez for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 07:20:41 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MAR00J000QGNC00@a-mtaout20.012.net.il> for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 14:18:54 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAR00J1Z0RI7J90@a-mtaout20.012.net.il>; Sat, 22 Sep 2012 14:18:54 +0300 (IDT) Date: Sat, 22 Sep 2012 14:18:42 +0300 From: Eli Zaretskii In-reply-to: <87haqqfhbk.fsf@gnu.org> X-012-Sender: halo1@inter.net.il Message-id: <83k3vml2zx.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org > Date: Sat, 22 Sep 2012 19:05:51 +0800 > > Eli Zaretskii writes: > > >> *************** > >> *** 8884,8892 **** > >> DEFSYM (Qxbm, "xbm"); > >> ADD_IMAGE_TYPE (Qxbm); > >> > >> - define_image_type (&xbm_type, 1); > >> - define_image_type (&pbm_type, 1); > > > > Why are these two lines being removed, while the corresponding > > ADD_IMAGE_TYPE lines are not? > > This change moves define_image_type into lookup_image_type, so that > these two image types are handled just like the other image types, for > simplicity. Right, I missed that. Sorry. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134832339919317 (code B ref 12463); Sat, 22 Sep 2012 14:17:01 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 14:16:39 +0000 Received: from localhost ([127.0.0.1]:49170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFQVa-00051W-K5 for submit@debbugs.gnu.org; Sat, 22 Sep 2012 10:16:38 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:35342) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFQVY-00051P-D9 for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 10:16:37 -0400 Received: by pbbjt11 with SMTP id jt11so7315378pbb.3 for <12463@debbugs.gnu.org>; Sat, 22 Sep 2012 07:14:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=FHnecAQh/RPiMOuug3rQdqjQU0FzNXZ51H4IAqlhgB8=; b=UD2N0YYVvadvBYRHfwBDdUlidz3wDPrm6x42ji5v14JAuusHt4xMVZFoxJbPB7+kBo W6k64JcGITnnmvnl0jJO3fo9azlF0hlfu2w2tn2KlmA43OoiMPz9sWhtwhkjK84Ac6fv ln8W4cvBarHVJ2yTX5NTQmClvYbUOpJfzyGo7/URTCzfcSCnYLz4KupxZ4ZLrT7hdz/Y KLwF0dCwkRULaFLI+CIKUg8lCZxVTCSXQEnoMGT7Ky9fE+H/sXjw5lUy1lBVh9xg9WIV Rlc7BB1f5TeXgqG7bHUaySuPAhRufPStjk2Bui8+/Hxm+4IYwbHH+3tHq1eaTKIBaT0I XPWA== Received: by 10.68.203.228 with SMTP id kt4mr23113818pbc.87.1348323292475; Sat, 22 Sep 2012 07:14:52 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id j3sm5758468paz.37.2012.09.22.07.14.49 (version=SSLv3 cipher=OTHER); Sat, 22 Sep 2012 07:14:51 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> Date: Sat, 22 Sep 2012 22:14:47 +0800 In-Reply-To: <83k3vml2zx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Sep 2012 14:18:42 +0300") Message-ID: <877grm4014.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) I've committed the patch to trunk. Please let me know if this causes any problems on Windows. Juanma, you can go ahead with your work on generalizing Vlibrary_cache, and thanks for waiting. I left the LIBRARIES issue alone in this patch, but I do think we should eliminate the second arg to init-image-library. I don't see what value other than `dynamic-library-alist' could possibly be supplied for this argument. Any objections to that? From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134832403320207 (code B ref 12463); Sat, 22 Sep 2012 14:28:01 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 14:27:13 +0000 Received: from localhost ([127.0.0.1]:49174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFQfk-0005Fo-Mh for submit@debbugs.gnu.org; Sat, 22 Sep 2012 10:27:12 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:46356) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFQfe-0005FJ-EV for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 10:27:07 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MAR00L0096V9Z00@a-mtaout20.012.net.il> for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 17:25:17 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAR00L5K9E50W60@a-mtaout20.012.net.il>; Sat, 22 Sep 2012 17:25:17 +0300 (IDT) Date: Sat, 22 Sep 2012 17:25:06 +0300 From: Eli Zaretskii In-reply-to: <877grm4014.fsf@gnu.org> X-012-Sender: halo1@inter.net.il Message-id: <83bogykud9.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> <877grm4014.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Chong Yidong > Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org > Date: Sat, 22 Sep 2012 22:14:47 +0800 > > I've committed the patch to trunk. Thanks. > Please let me know if this causes any problems on Windows. None that I could spot. > I left the LIBRARIES issue alone in this patch, but I do think we should > eliminate the second arg to init-image-library. I don't see what value > other than `dynamic-library-alist' could possibly be supplied for this > argument. Any objections to that? Not from me. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 19:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: Eli Zaretskii , jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134834179720377 (code B ref 12463); Sat, 22 Sep 2012 19:24:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 19:23:17 +0000 Received: from localhost ([127.0.0.1]:49596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVIL-0005Ic-KE for submit@debbugs.gnu.org; Sat, 22 Sep 2012 15:23:17 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:49431) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVII-0005IU-RN for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 15:23:16 -0400 Received: by weyx48 with SMTP id x48so2622447wey.3 for <12463@debbugs.gnu.org>; Sat, 22 Sep 2012 12:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=u/faUrLLuMPQf1AmscJcIPZGj0raHjYWQB+CghgARRA=; b=i4jap8uYhroXP1LwfJmxsnPlG8w64AxOfLcXVqoejw+lFDIjZkVJfom49OR2clhu6n ewteXkcyhC5ZCSbWTjl5bcI+iEXyCPMBwU5hYYZyas5sxjzwVuLRQ68ORc4FPdhLAAY/ ou3mayvbg0QggghiXIalt1PsKcI64gTgwf+ZKldAle76pHgA9ptsrLeNH6vtXFxVVHbx tVCQe5wNK+B2Q3lC99BdBLp+4YcYUjM+4sx5IY2nJa4K+6D0Mcs6QLG+xfqfiSR0NJAm q+1S2X1d0tRhPazjRF9QTGeVNoaYom3xLqFTYEMxtso45MJdapLBdJa0mfH5DCLn3+FI ybBw== Received: by 10.180.79.2 with SMTP id f2mr4451318wix.2.1348341688610; Sat, 22 Sep 2012 12:21:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Sat, 22 Sep 2012 12:20:48 -0700 (PDT) In-Reply-To: <877grm4014.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> <877grm4014.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 22 Sep 2012 21:20:48 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sat, Sep 22, 2012 at 4:14 PM, Chong Yidong wrote: > Juanma, you can go ahead with your work on > generalizing Vlibrary_cache, and thanks for waiting. Well, Vlibrary_cache is already pretty general. I only want to move it to emacs.c. Eli and I had talked about forcing the ops that work on Vlibrary_cache and image_types to not cache anything before dumping, but now that the entries for xbm and pbm are added the same way that other image libraries, I wonder whether wouldn't be easier/cleaner to simply set Vlibrary_cache = Qnil and image_types = NULL just before dumping. > I left the LIBRARIES issue alone in this patch, but I do think we should > eliminate the second arg to init-image-library. I don't see what value > other than `dynamic-library-alist' could possibly be supplied for this > argument. Any objections to that? Please, go for it. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 19:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134834332522535 (code B ref 12463); Sat, 22 Sep 2012 19:49:02 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 19:48:45 +0000 Received: from localhost ([127.0.0.1]:49617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVgy-0005rQ-TM for submit@debbugs.gnu.org; Sat, 22 Sep 2012 15:48:45 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:50009) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVgw-0005rH-CM for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 15:48:43 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MAR00000O2FVB00@a-mtaout20.012.net.il> for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 22:46:57 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAR000OFOA7DY80@a-mtaout20.012.net.il>; Sat, 22 Sep 2012 22:46:55 +0300 (IDT) Date: Sat, 22 Sep 2012 22:46:44 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83wqzlkfh7.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> <877grm4014.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Sat, 22 Sep 2012 21:20:48 +0200 > Cc: Eli Zaretskii , jwalt@garni.ch, 12463@debbugs.gnu.org > > Eli and I had talked about forcing the ops that work on Vlibrary_cache > and image_types to not cache anything before dumping, but now that the > entries for xbm and pbm are added the same way that other image > libraries, I wonder whether wouldn't be easier/cleaner to simply set > Vlibrary_cache = Qnil and image_types = NULL just before dumping. I think that would leak memory. Not a catastrophe, but still not clean. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134834375023102 (code B ref 12463); Sat, 22 Sep 2012 19:56:01 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 19:55:50 +0000 Received: from localhost ([127.0.0.1]:49621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVnq-00060Z-KK for submit@debbugs.gnu.org; Sat, 22 Sep 2012 15:55:50 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:39524) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFVno-00060S-I2 for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 15:55:49 -0400 Received: by wibhm6 with SMTP id hm6so2852840wib.15 for <12463@debbugs.gnu.org>; Sat, 22 Sep 2012 12:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2J5SJH0KDfL6L2E/fe1tioo2EuvzjFwG/8NorgHDMdk=; b=QAARgYwUwYOgqyg2I0QcL2thD67HGylhmWm2rQcVV9lVyBwuccAxkJp9MX1qCxsmB1 YViH7BG6amV4ROMl6QDs4xHuSzoTuD2VUpAoHQn0zuhj6nPRihzguX3rl+MqP5Nfki5X bFiKjRKqzTBW3mm8ndqPFdxahsa5jMYp4DyUx3DxFgPyxPYMPKMiLqW9QJsmW+ZgIATV vhCX+aQSsi15A88366i8r48pSNN/FIJI7nbIGHGarBdjC8/vYlrOr6Om3JU9wskHhvnj HB3zMW0GcVKtrwhJntCyJ8ATu3tc1N2I/5nQAz46FvFWG5/3iSCH9qTkn6zMLwS9Vyew O3kg== Received: by 10.216.5.213 with SMTP id 63mr4928815wel.20.1348343643644; Sat, 22 Sep 2012 12:54:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Sat, 22 Sep 2012 12:53:23 -0700 (PDT) In-Reply-To: <83wqzlkfh7.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> <877grm4014.fsf@gnu.org> <83wqzlkfh7.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 22 Sep 2012 21:53:23 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sat, Sep 22, 2012 at 9:46 PM, Eli Zaretskii wrote: > I think that would leak memory. Because of image_types? Can't the memory be xfree'd? Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134834536325336 (code B ref 12463); Sat, 22 Sep 2012 20:23:01 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 20:22:43 +0000 Received: from localhost ([127.0.0.1]:49639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFWDr-0006ab-BQ for submit@debbugs.gnu.org; Sat, 22 Sep 2012 16:22:43 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:49043) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFWDq-0006aU-CN for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 16:22:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCocG/2dsb2JhbABEtBGBCIIWAQVWIxALNBIUGA0kiCG6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="199731304" Received: from 76-10-135-6.dsl.teksavvy.com (HELO pastel.home) ([76.10.135.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Sep 2012 16:20:57 -0400 Received: by pastel.home (Postfix, from userid 20848) id 535CC593DE; Sat, 22 Sep 2012 16:20:56 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> <83sjaawnlf.fsf@gnu.org> Date: Sat, 22 Sep 2012 16:20:56 -0400 In-Reply-To: <83sjaawnlf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Sep 2012 09:58:20 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> >> Sorry, can't remember. Probably because I generally prefer passing >> >> arguments explicitly over passing them via dynamic binding. >> > We have gobs of functions in Emacs that access global variables like >> > Vdynamic_library_alist. I don't think one more function will change >> > anything. >> The question is not "global or not" but "let-bound or not". >> If it's generally accessed as a global var, that's perfectly fine. >> If it's generally let-bound, I prefer an explicit argument. > Sorry, I don't follow. We are discussing C code, so how do you mean > "let-bound"? If you mean by using specbind, then no, it isn't > let-bound, it's a global variable that always has the same value as it > had when the last cons cell was added to it. I'm saying: is the variable usually set once and left alone, or is it usually let-bound around the call to the function that uses the variable? In the case of dynamic-library-alist it seems it's never let-bound, so it's probably better to access it directly as a global var, rather than pass it as a parameter. Stefan From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Sep 2012 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134834604326372 (code B ref 12463); Sat, 22 Sep 2012 20:35:01 +0000 Received: (at 12463) by debbugs.gnu.org; 22 Sep 2012 20:34:03 +0000 Received: from localhost ([127.0.0.1]:49668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFWOp-0006rJ-5B for submit@debbugs.gnu.org; Sat, 22 Sep 2012 16:34:03 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:42846) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFWOn-0006qt-7z for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 16:34:01 -0400 Received: by wgbdt12 with SMTP id dt12so3141191wgb.15 for <12463@debbugs.gnu.org>; Sat, 22 Sep 2012 13:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=NtLIUHvWZ+z4HkKqn9xQeCJxlKip3B1Ux/6SJT8aono=; b=YWllg8qEaG+TUjZK8YKYYQw5/IlKZGevAvoUqhXxl008G92GqNIzGyZA1TK39gZAql a8WchXU/NAwpSaAHnlxf5WPwa7krHwzn6lZgK/LtSNxNjzScHlzy6JUyWrmR3XkzUfkD ZwtleWc5HXWtkqmROMIAgecOjLK8VJLRjvswrFvgvc+T5VbPlthulNARRw5H3/zUUV72 1hKwTd7a6ptpV1QgcFI0oOhBCv7r7YI3PEQ4W80JFdYvo2FExuq95XXpJW5ZeNcXO9QV eYUEPMwNqRnqwoyNCKBP3qHHJ5eTt5bK/0oujWELvsRcttLjAkRtoUqCEHoiO0qB37oN d7hQ== Received: by 10.216.195.209 with SMTP id p59mr2592243wen.138.1348345935972; Sat, 22 Sep 2012 13:32:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.155.132 with HTTP; Sat, 22 Sep 2012 13:31:35 -0700 (PDT) In-Reply-To: References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> <83sjaawnlf.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 22 Sep 2012 22:31:35 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sat, Sep 22, 2012 at 10:20 PM, Stefan Monnier wrote: > In the case of dynamic-library-alist it seems it's never let-bound, so > it's probably better to access it directly as a global var, rather than > pass it as a parameter. I'd be very surprised to find that someone ever let-bound dynamic-library-alist. I'd bet that anyone who ever needed to use a non-standard value (assuming someone did) just assigned it on .emacs. Juanma From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 03:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134837220431921 (code B ref 12463); Sun, 23 Sep 2012 03:51:01 +0000 Received: (at 12463) by debbugs.gnu.org; 23 Sep 2012 03:50:04 +0000 Received: from localhost ([127.0.0.1]:49996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFdCl-0008Io-Ez for submit@debbugs.gnu.org; Sat, 22 Sep 2012 23:50:04 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:59348) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFdCi-0008IJ-7M for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 23:50:01 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MAS00E00AAOIQ00@a-mtaout22.012.net.il> for 12463@debbugs.gnu.org; Sun, 23 Sep 2012 05:48:12 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAS00EA7AKBAH50@a-mtaout22.012.net.il>; Sun, 23 Sep 2012 05:48:12 +0200 (IST) Date: Sun, 23 Sep 2012 05:48:02 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83vcf5jt71.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <87r4pvitjk.fsf@gnu.org> <838vc3xq8p.fsf@gnu.org> <83392bxobc.fsf@gnu.org> <87lig2q292.fsf@gnu.org> <83k3vmwj1l.fsf@gnu.org> <87haqqfhbk.fsf@gnu.org> <83k3vml2zx.fsf@gnu.org> <877grm4014.fsf@gnu.org> <83wqzlkfh7.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > From: Juanma Barranquero > Date: Sat, 22 Sep 2012 21:53:23 +0200 > Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org > > On Sat, Sep 22, 2012 at 9:46 PM, Eli Zaretskii wrote: > > > I think that would leak memory. > > Because of image_types? Can't the memory be xfree'd? Yes, you can, if you put some code to do that before setting it to NULL. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 03:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: lekktu@gmail.com, cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134837236232131 (code B ref 12463); Sun, 23 Sep 2012 03:53:01 +0000 Received: (at 12463) by debbugs.gnu.org; 23 Sep 2012 03:52:42 +0000 Received: from localhost ([127.0.0.1]:50000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFdFK-0008MB-7x for submit@debbugs.gnu.org; Sat, 22 Sep 2012 23:52:42 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:38535) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFdFJ-0008M5-4S for 12463@debbugs.gnu.org; Sat, 22 Sep 2012 23:52:41 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MAS00L00A78AA00@a-mtaout23.012.net.il> for 12463@debbugs.gnu.org; Sun, 23 Sep 2012 05:50:54 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MAS00LC5AOT6A60@a-mtaout23.012.net.il>; Sun, 23 Sep 2012 05:50:54 +0200 (IST) Date: Sun, 23 Sep 2012 05:50:43 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83txupjt2k.fsf@gnu.org> References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> <83sjaawnlf.fsf@gnu.org> X-Spam-Score: -1.2 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > I'm saying: is the variable usually set once and left alone, or is it > usually let-bound around the call to the function that uses > the variable? > > In the case of dynamic-library-alist it seems it's never let-bound, so > it's probably better to access it directly as a global var, rather than > pass it as a parameter. It is never let-bound. It is modified by adding cons cells to it, and used by accessing those cells. From unknown Mon Aug 18 11:21:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: Eli Zaretskii , jwalt@garni.ch, Stefan Monnier , 12463@debbugs.gnu.org Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134839196328080 (code B ref 12463); Sun, 23 Sep 2012 09:20:02 +0000 Received: (at 12463) by debbugs.gnu.org; 23 Sep 2012 09:19:23 +0000 Received: from localhost ([127.0.0.1]:50241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFiLS-0007Iq-Vr for submit@debbugs.gnu.org; Sun, 23 Sep 2012 05:19:23 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:47864) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFiLQ-0007Ii-6O for 12463@debbugs.gnu.org; Sun, 23 Sep 2012 05:19:21 -0400 Received: by pbbjt11 with SMTP id jt11so8350712pbb.3 for <12463@debbugs.gnu.org>; Sun, 23 Sep 2012 02:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=EXAWJUHdg6sdNfO8Yg0ojLxBAtelW9E4sjJF98IjYZc=; b=mJCToYZp9ItC6Fg9S2/ehrdf90j4TlK5UFHBxTYEj/SfR3vXUKpJlo7oqGuvv050zE 4YnSiL3u4AZ2z7mJRyMtH7jAYFV+NWxKjeQVCAS8mQdD5N/KSBUwIllgs7wv8ksnJYR5 qYtIrFFLJ1RJUZta66thVycIaEeOFPiOzFN8WqWYb/4qOLKV00E4sn1uhcd0UOkgm5nI bP0nOKffAyIbSI8rJPiXYBuW0f0T90l1yDTFXm/6LEoswzvABrpEUuzE6DUikLKRhFxB UB4a81ZR/8gEAGMdc09ZS3c11S1WeVhIFQxK+p6DBnm7mL7KhetaebX0C3wePSG0O/1r yQZA== Received: by 10.68.202.168 with SMTP id kj8mr28439212pbc.8.1348391851954; Sun, 23 Sep 2012 02:17:31 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id te6sm7849848pbc.29.2012.09.23.02.17.28 (version=SSLv3 cipher=OTHER); Sun, 23 Sep 2012 02:17:30 -0700 (PDT) From: Chong Yidong References: <87wqzs1a4c.fsf@queen.i-did-not-set--mail-host-address--so-tickle-me> <83mx0n22p0.fsf@gnu.org> <87d31jcqce.fsf@gnu.org> <4023344.MyoQPQRfcJ@queen> <87sjac1185.fsf@gnu.org> <878vc4ylr6.fsf@gnu.org> <83pq5fyglu.fsf@gnu.org> <87d31fd8zi.fsf@gnu.org> <83fw6by2qz.fsf@gnu.org> <83a9wjxqhs.fsf@gnu.org> <83sjaawnlf.fsf@gnu.org> Date: Sun, 23 Sep 2012 17:17:26 +0800 In-Reply-To: (Juanma Barranquero's message of "Sat, 22 Sep 2012 22:31:35 +0200") Message-ID: <87obkxjdy1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: > On Sat, Sep 22, 2012 at 10:20 PM, Stefan Monnier > wrote: > >> In the case of dynamic-library-alist it seems it's never let-bound, so >> it's probably better to access it directly as a global var, rather than >> pass it as a parameter. > > I'd be very surprised to find that someone ever let-bound > dynamic-library-alist. I'd bet that anyone who ever needed to use a > non-standard value (assuming someone did) just assigned it on .emacs. OK, I've removed the LIBRARIES arguments, so that the dynamic loading code always uses dynamic-library-alist. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 02:26:53 2012 Received: (at control) by debbugs.gnu.org; 28 Nov 2012 07:26:53 +0000 Received: from localhost ([127.0.0.1]:42523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdc2m-0008CD-LI for submit@debbugs.gnu.org; Wed, 28 Nov 2012 02:26:53 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:53419) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdc2k-0008C6-Ru for control@debbugs.gnu.org; Wed, 28 Nov 2012 02:26:51 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so7182438pad.3 for ; Tue, 27 Nov 2012 23:24:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=OizSHcNo8mvlRuQq8ApyXIH/6BQRFXl55QYqzL63+vo=; b=UogL/tbhWgincbIohyb162q5lpuSywR1jWAMwT9qITjwMWYIhd/zoCoZKZd9JuiUJe rATzBtTnMTpV8CoBPLy2uDzshMVFW6puDup8DYgL/PtSl0kWVHBreGsPWyoFioKealD1 hx/DDFDHqzy+Dttm4DLEBomTcZSTFrx2EDeZ7bJZLmW2rXAAlahMnumcV6cg2wsAOUNZ q+6/G7nm5MHZIG5gAiBhxOOaE+3O84/72m9yB7i7mxb1SI1r+kaAu3qWfnKXinPkE6oW eeE+JFio3SvhR1zQ6RpT0pa1/Ozmzl8UAeZMOHbjhS+h614lhDOLcaQ1nEdMAUSuR9IZ ns2w== Received: by 10.68.211.39 with SMTP id mz7mr56239280pbc.5.1354087497353; Tue, 27 Nov 2012 23:24:57 -0800 (PST) Received: from ulysses ([155.69.18.190]) by mx.google.com with ESMTPS id is6sm12005668pbc.55.2012.11.27.23.24.54 (version=SSLv3 cipher=OTHER); Tue, 27 Nov 2012 23:24:56 -0800 (PST) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 12463 Date: Wed, 28 Nov 2012 15:24:51 +0800 Message-ID: <87lidm6vgc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) close 12463 thanks