all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Slow image display over network
Date: Fri, 24 Sep 2010 13:59:21 +0200	[thread overview]
Message-ID: <87r5gj1heu.fsf@lola.goethe.zz> (raw)
In-Reply-To: m3d3s3nzzl.fsf@quimbies.gnus.org

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> I don't think that this is relevant for remote operation.  Emacs goes
>> through a complex call chain for every single pixel of an X image in
>> order to create it.  Quite nonsensical.
>
> So are you suggesting that this can be fixed?

You are in a twisty little maze of per-pixel procedure calls, all alike.
Intermingled is the display alpha channel correction.  Calculated fresh
for every pixel.

Of course it would make sense to batch all of this and do calls only for
whole pictures or rectangles.  That needs restructuring the code.

If that is done well, it would make sense to route the color management
on a Gtk target completely through Gdk: it does a good and
well-optimized job with it.  But you won't get much of an improvement if
you call Gdk again for every pixel.

>> Once it is through, it goes to the X server as one image if I am not
>> mistaken, and gets moved into a pixmap (the Emacs image cache).  So
>> the worst that can happen is that it is in a format not best for
>> remote transfer.
>
> First it's transferred pixel-by-pixel, and then it's transferred as an
> image?

No.  First it is _created_ entirely on the client side using a call
chain ending in Xlib calls, pixel-by-pixel for the whole call chain.
Then the X Image (which is a client-side data structure) is transferred
into a Pixmap (which is a server-side data structure) as one piece.

So while Xlib is called over and over, the actual traffic to the X
server should be tolerably optimized.

All of this speaking just from memory of when I last looked at the Emacs
21 display engine.

-- 
David Kastrup




  reply	other threads:[~2010-09-24 11:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 23:43 Slow image display over network Lars Magne Ingebrigtsen
2010-09-24  1:20 ` Leo
2010-09-24  7:58   ` Eli Zaretskii
2010-09-24  8:18     ` Leo
2010-09-24  1:47 ` Daniel Pittman
2010-09-24  7:31   ` Jan Djärv
2010-09-24 11:06   ` David Kastrup
2010-09-24 11:23   ` Lars Magne Ingebrigtsen
2010-09-24 11:51     ` David Kastrup
2010-09-24 11:54       ` Lars Magne Ingebrigtsen
2010-09-24 15:56         ` Chong Yidong
2010-09-24 12:05     ` joakim
2010-09-24 12:21       ` Leo
2010-09-24 12:56       ` Lars Magne Ingebrigtsen
2010-09-24 13:41         ` joakim
2010-09-24 15:55           ` Lars Magne Ingebrigtsen
2010-09-25  3:35     ` YAMAMOTO Mitsuharu
2010-09-24  6:25 ` Stephen J. Turnbull
2010-09-24  7:11   ` David Kastrup
2010-09-24 11:27     ` Lars Magne Ingebrigtsen
2010-09-24 11:59       ` David Kastrup [this message]
2010-09-24 12:57         ` Lars Magne Ingebrigtsen
2010-09-24 14:26         ` Jan Djärv
2010-09-24 11:25   ` Lars Magne Ingebrigtsen
2010-09-24 12:55   ` Lars Magne Ingebrigtsen
2010-09-24  7:44 ` joakim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5gj1heu.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.