all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Inefficient redisplay
Date: Mon, 12 Apr 2010 17:46:21 -0400	[thread overview]
Message-ID: <jwv39z0qrhw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83pr24xuio.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Apr 2010 23:53:19 +0300")

>> >> This makes nhexl-mode completely unusable except on small buffers
>> > I suggest, first of all, to understand why the display engine misses
>> > the newlines you say you have in the before-strings.
>> Given my lack of understanding of the redisplay code, this is
>> more difficult.
> I could try, but is it possible to have a test case simpler than the
> whole package?  Something like one or two lines of text with whatever
> properties and overlays are needed to exhibit the problem?

I haven't gotten down to that yet.

> Also, what _is_ the problem, exactly?  Is that only that jit-lock
> misbehaves, or is there something else?  You said in your original
> mail that "redisplay code somehow seems to treat nhexl-mode's buffers
> as one single long-line", but what are the symptoms of this?

Several problems:
1- it seems that I'm not able to have position N displayed without
   having all positions 1..N with fontified set to non-nil (I.e. I have
   to have all the prefix of the buffer fontified).  That's a major
   problem since I use overlays: if N is large, that implies a large
   number of overlays, which implies serious performance problems.
2- performance sucks.  Maybe it's because of 1, but it's probably not
   only due to that, because performance is better when I go back to the
   beginning of the buffer (which doesn't remove overlays).

>> > The Emacs display code is known to behave very unfriendly when lines
>> > are too long, so my first advice would be not to do what hurts.
>> The buffer's actual text doesn't have long lines, and the display
>> doesn't have long lines either, so it really *should* work fine.
> The display engine does not see newlines that are covered by `display'
> properties and overlay strings, it sees the contents of the strings
> instead.  So if it _really_ misses the newlines in the
> `before-strings' you set up, it will behave as if the buffer had one
> long line.

The behavior I see seems consistent with a situation where the redisplay
"doesn't see" the newlines in the before-strings (although it does
display them correctly).

> The question is: how and why (and whether) does it miss those
> newlines.

Yes, we're still in the dark here.


        Stefan




  reply	other threads:[~2010-04-12 21:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12  4:34 Inefficient redisplay Stefan Monnier
2010-04-12 17:17 ` Eli Zaretskii
2010-04-12 19:28   ` Stefan Monnier
2010-04-12 20:53     ` Eli Zaretskii
2010-04-12 21:46       ` Stefan Monnier [this message]
2010-04-13 20:05         ` Eli Zaretskii
2010-04-14 18:13         ` Eli Zaretskii
2010-04-15  4:38           ` Stefan Monnier
2010-04-15 11:05             ` Eli Zaretskii
2010-04-15 17:34               ` Stefan Monnier

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=jwv39z0qrhw.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@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.