all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: image scaling
Date: Fri, 22 Feb 2008 23:51:05 +0100	[thread overview]
Message-ID: <85lk5c7gh2.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87y79c1unt.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 22 Feb 2008 17:41:10 -0500")

Chong Yidong <cyd@stupidchicken.com> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> The point is that when the image data is loaded into memory, Emacs
>> still can't display it fast.  It converts it with a painfully slow
>> conversion chain called for every pixel into a pixmap and caches
>> that.  Considering that the binary data is pretty much identical a
>> pixmap to start with (maybe modulo a gamma correction lookup table),
>> this is somewhat ridiculous.  The code paths are so muddled, however,
>> that it is not easy to rip this out.
>>
>> Have you actually looked at the code?
>
> I'm fairly familiar with the code.

It's been some time since I looked at it, and it was pretty inscrutable.
I doubt it has improved much.

> If Emacs can't quickly display images that are already loaded into
> memory, it's not clear to me that the problem lies in the image.c code
> rather than redisplay.

Oh, I was not trying to assign blame to a particular piece of code.  It
is just what happens in totality is pretty ugly, almost to the point of
being absurd.  It may well be that each part, in isolation, does things
as good as can be expected, given the designed APIs and pathways.

> Could you elucidate?  When you say the image is already "loaded into
> memory", do you mean that the image is supplied using a Lisp string
> representing binary data (i.e., passing a DATA-P argument to
> create-image),

For example.

> or are you simply referring to time Emacs takes to run the png_load
> function (i.e., from calling the libpng functions parsing the file
> until Emacs finishes populating and caching the pixmaps)?

It has been some time since I last looked at the code and finally gave
up in disgust (twisty maze of passages...).  So I can't be much more
specific.  The gist is that Emacs is orders of magnitude slower than
programs which basically just tie libraries together without serious
data manipulation of their own.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




  reply	other threads:[~2008-02-22 22:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21  4:21 image scaling Stefan Monnier
2008-02-21  8:42 ` Mathias Dahl
2008-02-21  9:10   ` Miles Bader
2008-02-21 15:59   ` Stefan Monnier
2008-02-21 20:41     ` Mathias Dahl
2008-02-21 10:01 ` David Kastrup
2008-02-21 10:06 ` joakim
2008-02-21 12:43   ` David O'Toole
2008-02-21 18:43 ` Chong Yidong
2008-02-21 21:49   ` David Kastrup
2008-02-21 22:20     ` Miles Bader
2008-02-22  6:35       ` Jan Djärv
2008-02-22  6:49         ` Miles Bader
2008-02-22  7:26           ` Jan Djärv
2008-02-22 22:57         ` Richard Stallman
2008-02-22  4:57     ` Chong Yidong
2008-02-22  7:48       ` David Kastrup
2008-02-22 20:28         ` Chong Yidong
2008-02-22 21:52           ` David Kastrup
2008-02-22 22:41             ` Chong Yidong
2008-02-22 22:51               ` David Kastrup [this message]
2008-02-22 10:23       ` Juanma Barranquero
2008-02-22 10:55         ` Thien-Thi Nguyen
2008-02-22 11:06           ` Juanma Barranquero
2008-02-22 20:38             ` Chong Yidong
2008-02-22 20:47               ` Juanma Barranquero
2008-02-22 22:21               ` Miles Bader
2008-02-23 19:28               ` Richard Stallman
2008-02-22 22:57       ` Richard Stallman
2008-02-21 22:28 ` Richard Stallman

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=85lk5c7gh2.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.