unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: John Yates <john@yates-sheets.org>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: How can I predict which regions xdisp will present me for font-locking?
Date: Mon, 12 Mar 2012 20:00:06 +0200	[thread overview]
Message-ID: <834nttya1l.fsf@gnu.org> (raw)
In-Reply-To: <CAJnXXoh+zcqHa9iZAAtGstVpKuEffgCiSwz+QGV0JhmgjZHTaA@mail.gmail.com>

> Date: Mon, 12 Mar 2012 13:47:00 -0400
> From: John Yates <john@yates-sheets.org>
> Cc: Alan Mackenzie <acm@muc.de>, emacs-devel@gnu.org
> 
> >  . every change in the buffer triggers a call to
> >    font-lock-extend-jit-lock-region-after-change (via
> >    jit-lock-after-change-extend-region-functions)
> >
> >  . font-lock-extend-jit-lock-region-after-change extends the region
> >    of the change according to the font-lock properties of the major
> >    mode, then marks that region unfontified by putting on it a
> >    `fontified' text property with the value nil
> >
> >  . the next redisplay cycle calls jit-lock-function (via
> >    fontification-functions) at the beginning of the region whose
> >    `fontified' property is nil, and refontifies the region from there
> >    in chunks of 500 characters (but every chunk is extended so that
> >    its start is at the beginning of a line and its end is at the end
> >    of a line)
> >
> > Does this explain what you see?
> 
> How does this strategy differ from 23.x?

It doesn't, not in the display engine.

> I am seeing a horrendous slowdown when editing atypical macros (though
> no more than 50 lines long).

Can you give more quantitative description of the slowdown?  E.g., how
much time does it take to move the cursor by one character or one
line, or to insert or delete a single character?

If you replace cc-mode Lisp files in v24 with those in v23, does the
problem go away?




  reply	other threads:[~2012-03-12 18:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-11 20:59 How can I predict which regions xdisp will present me for font-locking? Alan Mackenzie
2012-03-11 21:45 ` Eli Zaretskii
2012-03-12 17:47   ` John Yates
2012-03-12 18:00     ` Eli Zaretskii [this message]
2012-03-13 19:50       ` John Yates
2012-03-13 21:00         ` Alan Mackenzie
2012-03-13 21:18         ` Eli Zaretskii
2012-03-12 18:49     ` Alan Mackenzie
2012-03-12 19:25 ` Stefan Monnier
2012-03-13 14:05   ` Alan Mackenzie

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=834nttya1l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=john@yates-sheets.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).