From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Date: Fri, 21 Sep 2012 20:45:11 +0300 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1348249534 27452 80.91.229.3 (21 Sep 2012 17:45:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 17:45:34 +0000 (UTC) Cc: cyd@gnu.org, jwalt@garni.ch, 12463@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 21 19:45:37 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TF7IE-0000Uh-9A for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 19:45:34 +0200 Original-Received: from localhost ([::1]:43786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7I9-0007rf-SC for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 13:45:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7I6-0007q1-LM for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 13:45:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF7I5-0006Xa-8J for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 13:45:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF7I5-0006XQ-4o for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 13:45:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TF7Je-0007Z8-8K for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 13:47:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134824961329067 (code B ref 12463); Fri, 21 Sep 2012 17:47:02 +0000 Original-Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 17:46:53 +0000 Original-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 Original-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 Original-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) Original-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) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64699 Archived-At: > 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.