From: storm@cua.dk (Kim F. Storm)
Cc: cyd@stupidchicken.com, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Display slowness that is painful
Date: Fri, 03 Feb 2006 10:55:29 +0100 [thread overview]
Message-ID: <m3oe1oix66.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1F4q5g-0003pt-00@etlken> (Kenichi Handa's message of "Fri, 03 Feb 2006 10:50:24 +0900")
Kenichi Handa <handa@m17n.org> writes:
> In article <m3d5i6m1vd.fsf@kfs-l.imdomain.dk>, storm@cua.dk (Kim F. Storm) writes:
>
> I think another reason of the slowness is this part (in
> set_iterator_to_next):
>
> case GET_FROM_DISPLAY_VECTOR:
> [...]
> /* Restore face of the iterator to what they were before the
> display vector entry (these entries may contain faces). */
> it->face_id = it->saved_face_id;
>
> if (it->dpvec + it->current.dpvec_index == it->dpend)
> {
> [...]
> /* Recheck faces after display vector */
> it->stop_charpos = IT_CHARPOS (*it);
> }
> break;
>
> Because of this, it seems that handle_stop is called for
> every character after an eight bit character. Isn't it
> possible to tune it? First of all, why should we recheck
> faces after display vector?
2004-12-13 Kim F. Storm <storm@cua.dk>
* xdisp.c (set_iterator_to_next): Reset stop_charpos after display
vector.
It was made to fix the following bug:
> From: Stefan Monnier
> Subject: Incorrect faces on display
> Date: Thu, 09 Dec 2004 17:15:31 -0500
> User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)
>
> I started seeing recently problems where elisp code gets displayed with the
> font-lock-comment-face even though it's not a comment.
>
> This always shows up right after an invisible piece of text (I use
> outline-minor-mode in elisp).
>
> I first thought it was some funny bug in font-lock or jit-lock, but a quick
> C-u C-x = shows that the text-properties are correct: the problem is in
> the redisplay.
>
> I finally came up with a recipe to reproduce it:
>
> emacs -Q -f global-font-lock-mode -f outline-minor-mode
>
> (; RET a RET (foobar C-u 1000 M-x hide-sublevels
>
> If all goes well, you'll see that the second line displays "(foobar" using
> font-lock-comment-face.
The following addition to my previous patch changes this to only
recheck after ellipsis. It does indeed speed up redisplay even
more.
I cannot say whether this will break other redisplay cases though:
*** xdisp.c 24 Jan 2006 09:30:15 +0100 1.1073
--- xdisp.c 03 Feb 2006 10:28:21 +0100
***************
*** 5694,5699 ****
--- 5714,5721 ----
if (it->dpvec + it->current.dpvec_index == it->dpend)
{
+ int recheck_faces = it->ellipsis_p;
+
if (it->s)
it->method = GET_FROM_C_STRING;
else if (STRINGP (it->string))
***************
*** 5716,5723 ****
set_iterator_to_next (it, reseat_p);
}
! /* Recheck faces after display vector */
! it->stop_charpos = IT_CHARPOS (*it);
}
break;
--- 5738,5746 ----
set_iterator_to_next (it, reseat_p);
}
! /* Maybe recheck faces after display vector */
! if (recheck_faces)
! it->stop_charpos = IT_CHARPOS (*it);
}
break;
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2006-02-03 9:55 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 22:31 Display slowness that is painful Richard Stallman
2006-01-31 5:10 ` Chong Yidong
2006-01-31 23:09 ` Richard M. Stallman
2006-02-01 1:25 ` Chong Yidong
2006-02-01 2:59 ` Stefan Monnier
2006-02-01 4:52 ` Chong Yidong
2006-02-01 5:15 ` Miles Bader
2006-02-02 6:02 ` Chong Yidong
2006-02-02 4:15 ` Richard M. Stallman
2006-02-02 4:50 ` Chong Yidong
2006-02-01 10:43 ` Andreas Schwab
2006-02-03 2:06 ` Kenichi Handa
2006-02-03 10:15 ` Andreas Schwab
2006-02-03 12:01 ` Kenichi Handa
2006-02-03 13:08 ` Andreas Schwab
2006-02-03 19:17 ` Eli Zaretskii
2006-02-03 23:34 ` Andreas Schwab
2006-02-07 1:41 ` Kenichi Handa
2006-02-02 4:16 ` Richard M. Stallman
2006-02-02 5:55 ` Chong Yidong
2006-02-02 6:12 ` Chong Yidong
2006-02-02 9:50 ` David Kastrup
2006-02-02 14:02 ` Stefan Monnier
2006-02-03 23:43 ` Richard M. Stallman
2006-02-02 11:33 ` Kim F. Storm
2006-02-03 1:50 ` Kenichi Handa
2006-02-03 9:55 ` Kim F. Storm [this message]
2006-02-04 18:27 ` Richard M. Stallman
2006-02-03 5:04 ` Richard M. Stallman
2006-02-03 10:00 ` Kim F. Storm
2006-02-03 23:01 ` Stefan Monnier
2006-02-05 0:16 ` Kim F. Storm
2006-02-04 18:27 ` Richard M. Stallman
2006-02-04 21:18 ` Kim F. Storm
2006-02-05 1:59 ` Stefan Monnier
2006-02-06 2:06 ` Richard M. Stallman
2006-02-06 8:22 ` Kim F. Storm
2006-02-07 6:06 ` Richard M. Stallman
2006-02-07 9:14 ` Kim F. Storm
2006-02-08 19:03 ` Richard M. Stallman
2006-02-09 9:20 ` Kim F. Storm
2006-02-09 20:10 ` Eli Zaretskii
2006-02-13 4:40 ` Richard M. Stallman
2006-02-13 4:40 ` Richard M. Stallman
2006-02-06 2:06 ` Richard M. Stallman
2006-02-06 8:19 ` Kim F. Storm
2006-02-06 8:45 ` Miles Bader
2006-02-06 10:34 ` Kim F. Storm
2006-02-07 6:06 ` Richard M. Stallman
2006-02-05 0:30 ` Miles Bader
2006-02-05 0:44 ` Kim F. Storm
2006-02-02 14:00 ` Stefan Monnier
2006-02-01 10:51 ` Andreas Schwab
2006-02-01 23:10 ` Chong Yidong
2006-02-02 4:16 ` Richard M. Stallman
2006-02-02 10:37 ` Andreas Schwab
-- strict thread matches above, loose matches on Subject: below --
2006-01-19 17:43 Richard Stallman
2006-01-31 5:07 ` Evil Boris
2006-01-11 18:58 Richard M. 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
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=m3oe1oix66.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=rms@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 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).