unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Q on performance with 10000 faces
Date: Sun, 21 May 2006 23:26:00 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICCEHKDGAA.drew.adams@oracle.com> (raw)
In-Reply-To: <umzdag1z9.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2806 bytes --]

    > Does this mean that Emacs cannot reasonably be expected to
    > display 10000 face text-properties?

    AFAIK, yes.  Doing what you did (a) disables all possible display
    optimizations that the redisplay engine has up its sleeve to speed up
    the common cases, and (b) forces Emacs to traverse the 10000 text
    properties for each character it is about to display.

What is it that you think I did that causes that? Perhaps I could do things
differently. Do you mean just the fact of using 10000 different face text
properties or something else also?

    > If so, any advice on workarounds or other approaches?

    I don't know of any, except ``don't do that'', but perhaps Kim or
    Stefan will.

Don't do what? Use that many faces or something else also?

    > Is the slowdown perhaps because of some kind of automatic updating or
    > refreshing, which I could turn off somehow (I hope)?

    It's because even cursor motion, that usually takes a fast shortcut
    through the redisplay code, requires to search all the text properties
    in your situation.

I'm a little surprised that a frame that is not selected and has no current
activity (no cursor motion etc.), would continue to slow Emacs down just by
being displayed on the computer screen (and listening for input). I can see
why activity within that frame (or moving the frame, or moving another frame
across it, etc.) might cause Emacs to slow down due to redisplay, but the
same slowness continues even when that frame is ignored (just sits there,
selected or unselected).

I'd appreciate any advice on achieving the same end, either in some other
way or by somehow tweaking this approach.

I guess one alternative would be to insert an image of a complete palette
(like the image attached) and implement something similar to an HTML image
map (unless that functionality already exists in Emacs), to pick up the
position of a mouse click. That is, monitor mouse-click positions, and work
backward to determine the picked color. But that would require associating
the original color info (e.g. #RRRRGGGGBBBB with image positions. The
advantage of the approach I chose is that each character's text property has
the color info within it. Of course, if the approach isn't realistic due to
display performance, it's back to the drawing board.

I'm not familiar with the Emacs treatment of images. Looking in the Elisp
manual for info on them, I didn't see anything similar to HTML image maps.
Is there such a functionality already?

Attached is a screen capture of my hue x saturation palette (the 100 char x
100 char frame that slows Emacs down), to give you an idea of the kind of
thing I'd like to do. (The frame could be made square if I could figure out
a way to get rid of inter-line spacing.)

Thanks for the info.

[-- Attachment #2: hue-x-saturation-palette.jpg --]
[-- Type: image/jpeg, Size: 31291 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2006-05-22  6:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-22  0:02 Q on performance with 10000 faces Drew Adams
2006-05-22  3:41 ` Eli Zaretskii
2006-05-22  6:26   ` Drew Adams [this message]
2006-05-22  6:42     ` Miles Bader
2006-05-22 13:39       ` Drew Adams
2006-05-22  8:15     ` Kim F. Storm
2006-05-22 13:47       ` Drew Adams
2006-05-22 12:59     ` Stefan Monnier
2006-05-22 13:49       ` Drew Adams
2006-05-22 18:45         ` Eli Zaretskii
2006-05-22 18:44       ` Eli Zaretskii
2006-06-02 15:04         ` Drew Adams
2006-06-03  1:43           ` Drew Adams
2006-06-04 22:39             ` Kim F. Storm
2006-06-05  0:29               ` Drew Adams
2006-06-05 21:35                 ` Kim F. Storm
2006-06-06  6:53                   ` Drew Adams
2006-05-22 18:41     ` Eli Zaretskii
2006-05-22 20:59       ` Drew Adams
2006-05-22 22:30         ` Drew Adams
2006-05-22 23:28           ` Kevin Rodgers
2006-05-23  0:41             ` Drew Adams
2006-05-23  0:43         ` Luc Teirlinck
2006-05-23  1:25           ` Drew Adams
2006-05-25 16:21             ` Drew Adams
2006-05-23 11:08         ` Stefan Monnier
2006-05-23 14:07           ` Drew Adams
2006-05-23 23:48             ` Luc Teirlinck
2006-05-24  0:02               ` Drew Adams
2006-05-23 19:00           ` Eli Zaretskii
2006-05-23 21:06             ` Stefan Monnier
2006-05-24  5:50               ` Richard Stallman
2006-05-24 12:02                 ` Stefan Monnier
2006-05-25  0:36                   ` Richard Stallman
2006-05-25  3:22                     ` Eli Zaretskii
2006-05-25 16:31                       ` Richard Stallman
2006-05-22 15:12 ` Richard Stallman
2006-05-22 15:18   ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICCEHKDGAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).