From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Slow image display over network Date: Sat, 25 Sep 2010 12:35:04 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <87iq1v6hg1.fsf@rimspace.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1285385728 25375 80.91.229.12 (25 Sep 2010 03:35:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Sep 2010 03:35:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 25 05:35:27 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 1OzLXo-0006BA-2S for ged-emacs-devel@m.gmane.org; Sat, 25 Sep 2010 05:35:24 +0200 Original-Received: from localhost ([127.0.0.1]:37651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzLXn-00067t-Cz for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 23:35:23 -0400 Original-Received: from [140.186.70.92] (port=45645 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzLXg-00067k-UD for emacs-devel@gnu.org; Fri, 24 Sep 2010 23:35:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzLXb-0002io-1B for emacs-devel@gnu.org; Fri, 24 Sep 2010 23:35:16 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:63014) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzLXa-0002g2-DQ for emacs-devel@gnu.org; Fri, 24 Sep 2010 23:35:10 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 723C5C0557 for ; Sat, 25 Sep 2010 12:35:04 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) 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:130822 Archived-At: >>>>> On Fri, 24 Sep 2010 13:23:02 +0200, Lars Magne Ingebrigtsen said: > Daniel Pittman writes: >> Aw, heck. I saved you the time: PNG loading does create the X >> image and pixmap during the load process, confirming my guesswork. >> I didn't check the other image loaders, but they would sensibly >> behave the same way, showing the same result. > Right. Image load pushes the image over X, even though we're not > actually going to display it? > That means that the way Gnus displays images is as pessimal as > possible. When reading a HTML message with images, Gnus calls > (image-size (create-image ...)) to find out the size, and then if > it's too big, it rescales the image down. And this means that the > huge image has to be transferred first over the slow X connection, > and then rescaled, and then probably transferred again? > Is this really necessary? :-) Why can't image transfer to the X > server wait until the `put-image' call? Of course, creation of Pixmap from XImage can be deferred until the actual display happens. Actually, the Carbon port and its descendants do that. In those ports, CGImage (which conceptually corresponds to Pixmap in X11) is created from struct _XImage (which corresponds to XImage in X11) at prepare_image_for_display, not at lookup_image. The `pixmap' and `mask' members in struct image actually point to struct _XImage data rather than CGImage there. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp