From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Slow image display over network Date: Fri, 24 Sep 2010 11:56:23 -0400 Message-ID: <87d3s32l08.fsf@stupidchicken.com> References: <87iq1v6hg1.fsf@rimspace.net> <87vd5v1hre.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285344472 30663 80.91.229.12 (24 Sep 2010 16:07:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Sep 2010 16:07:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 24 18:07:51 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OzAoB-0007D5-Su for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 18:07:49 +0200 Original-Received: from localhost ([127.0.0.1]:54790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzAj3-0003qP-4Y for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 12:02:17 -0400 Original-Received: from [140.186.70.92] (port=45794 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzAeJ-0000w8-VG for emacs-devel@gnu.org; Fri, 24 Sep 2010 12:00:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzAdN-0004NC-2D for emacs-devel@gnu.org; Fri, 24 Sep 2010 11:56:28 -0400 Original-Received: from pantheon-po43.its.yale.edu ([130.132.50.104]:60157) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzAdM-0004Mx-W7 for emacs-devel@gnu.org; Fri, 24 Sep 2010 11:56:25 -0400 Original-Received: from furry (dhcp128036014154.central.yale.edu [128.36.14.154]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o8OFuN4F007163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 24 Sep 2010 11:56:23 -0400 Original-Received: by furry (Postfix, from userid 1000) id A576316D402; Fri, 24 Sep 2010 11:56:23 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Fri, 24 Sep 2010 13:54:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130785 Archived-At: Lars Magne Ingebrigtsen writes: > David Kastrup writes: > >> create-image is not a problem. image-size, however, calls lookup_image, >> and that loads and initiates an image, including caching it etc. > > Hm. I can understand the need to instantiate the image if we're asking > for the char size of the image, but not the pixel size. Perhaps this is > something that can be fixed pretty easily? It is straightforward but some work. You have to replace the call to lookup_image in `image-size' with a new function that avoids loading the image. This function would, in turn, call new functions that are similar to *_load (where * is xbm, xpm, pbm, png, jpeg, tiff, gif, and imagemagick), that extract the size data without loading the image data if not already loaded.