From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#12463: 24.2; pos-visible-in-window-p gets slower over time Date: Fri, 21 Sep 2012 17:24:17 +0800 Message-ID: <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348219542 21930 80.91.229.3 (21 Sep 2012 09:25:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 09:25:42 +0000 (UTC) Cc: lekktu@gmail.com, jwalt@garni.ch, 12463@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 21 11:25:46 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 1TEzUU-000184-P9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 11:25:43 +0200 Original-Received: from localhost ([::1]:44529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzUQ-0000v3-9m for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 05:25:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzUM-0000uI-Rm for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:25:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEzUE-0002OC-Cn for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:25:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzUE-0002NL-8F for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:25:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TEzVl-0003gd-UA for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:27:01 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 12463-submit@debbugs.gnu.org id=B12463.134821956314102 (code B ref 12463); Fri, 21 Sep 2012 09:27:01 +0000 Original-Received: (at 12463) by debbugs.gnu.org; 21 Sep 2012 09:26:03 +0000 Original-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 Original-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 Original-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== Original-Received: by 10.66.75.105 with SMTP id b9mr11701414paw.58.1348219464091; Fri, 21 Sep 2012 02:24:24 -0700 (PDT) Original-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) In-Reply-To: <83pq5fyglu.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Sep 2012 10:34:05 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) 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:64685 Archived-At: 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.