From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Slow image display over network Date: Fri, 24 Sep 2010 01:43:28 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285285446 5130 80.91.229.12 (23 Sep 2010 23:44:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2010 23:44:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 24 01:44:05 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 1OyvSJ-0007N1-2V for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 01:44:04 +0200 Original-Received: from localhost ([127.0.0.1]:50192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyvSH-00014t-2a for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 19:43:57 -0400 Original-Received: from [140.186.70.92] (port=41023 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyvS8-00014o-EG for emacs-devel@gnu.org; Thu, 23 Sep 2010 19:43:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyvS3-0005lN-FA for emacs-devel@gnu.org; Thu, 23 Sep 2010 19:43:48 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52435) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyvS3-0005lB-4b for emacs-devel@gnu.org; Thu, 23 Sep 2010 19:43:43 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OyvRx-0007FY-IH for emacs-devel@gnu.org; Fri, 24 Sep 2010 01:43:37 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Sep 2010 01:43:37 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Sep 2010 01:43:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 48 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVjSELZwr+JamOniYO4 mpaaenPzkw4+AAACQUlEQVQ4jZVUy5LbIBCk9AVRlr1TqLjbGrgvy+iugOb/fyXdyOtLTsE2lqen H4Nccus/K7i5/gM4b0Crvku+4u2r+qxfTol4lis+6vFV/dpOl4H4+kMhC2XNZGCtOoXwUrKevj4I TOW3D6+PFm4GKPSsjRQl5fsGPHym3L35dX/8MLzSILOfjc9fL4ChdRpn5vZ6OnS9/Fdt+KzHk4XH mzETTDu6Y3KRH5c5J2PAjFKiDWq+5bXJUOxjRS8ZrKugbRKQ4OPp5XxLcQkIopK9wTxTCiSZ6XTO 7nN7uFcBno3HDxpdOgAIFIANTBultlwu367fbkhus6rz6Oct8KKB5jKn92XogFK5jk1x7CBIGU1k VC+v8evn9uVs5r0z8/QQNn8MgTnWmIHLVSJGLzL2P8c5ARH+5NHOf4bW1k+HiAybYWC5NjE0jf2i RzEb2BSnFg1zSMZVcNYHpdQ08/9gyolkdy6xXyzrMfYkEi1JT337dknM4lYSnXTfqnKw1oOLEYSS 8T4y4pSkRZpByix1iIxmPcZtjx0CuDhdHB2aFodRKlVfcruOCKkUpVtGZjOo94hv9E0ggTusxLhE i2lAYEkEekylJ2RYWzHeb4SJMxX8GwTQfJCMFJTiJbKkYj0sSJK0pxDjLTWMwbJXHI8Ktp6cC0QM 1rCiHIwRYjkBLN1BJEF3AcoLF11wKEf+jhFTxFFSCxvoeAIsaODCnsC5K5gDnPmEYBAHteA2bneZ bbgxOXB4LkPTEiYy8ddzB6UR/gKHlNS4eChUvwAAAABJRU5ErkJggg== Mail-Copies-To: never X-Now-Playing: Alva Noto's _For 2_: "Argonaut-Version (for Heiner =?iso-8859-1?Q?M=FCller=29=22?= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:tYO4Osom9RGOX2ZYBzP9DGV8ZXU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:130714 Archived-At: One thing I've wondered about for a while, but has become more relevant lately (what with the web feeds in Gnus and stuff) is why image display is so slow over remote connections. Here's how to reproduce: 1) ssh somewhere that's far away, so that there's plenty of latency 2) open an Emacs over X 3) (put-image "/tmp/pretty-big-picture.jpg" (point)) Depending on how big the picture is, and what the latency is, this might take very long time. 4) switch to a different buffer This will be instantaneous. 5) switch back to the buffer where the picture is This will not be instantaneous, but it will be very fast. So that's the behaviour I don't understand. The first time you display an image (over a high-latency X connection), it's really slow. The next time you display the same picture, it's really fast. Emacs caches pictures internally, but that doesn't really explain the incredible slowness the first time the picture is displayed remotely. Or does it? To me it seems like there might be a lot of ping-pong network chatter when Emacs is instantiating pictures the first time. In fact, just calling this takes several seconds remotely: (image-size (create-image "/tmp/sleeve.jpg") t) But only the first time. Hm. Actually, `put-image' after the first `image-size' is instantaneous. Which sort of confirms my suspicions -- it's not the remote image display per se that is latency-sensitive, but something Emacs does while instantiating it. Does anybody know what's causing this? Or where I should poke around? -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen