unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: C-n is very slow in Font-Lock mode
Date: Wed, 27 Apr 2005 00:57:05 +0200	[thread overview]
Message-ID: <85hdhtf8ou.fsf@lola.goethe.zz> (raw)
In-Reply-To: <01c54ab1$Blat.v2.4$91328080@zahav.net.il> (Eli Zaretskii's message of "Wed, 27 Apr 2005 01:43:52 +0300")

"Eli Zaretskii" <eliz@gnu.org> writes:

>> Cc: rms@gnu.org, emacs-devel@gnu.org
>> From: David Kastrup <dak@gnu.org>
>> Date: Tue, 26 Apr 2005 23:38:11 +0200
>> 
>> > I think jit-lock-defer-time _is_ the way to avoid the slowness if
>> > you are willing to see the text unfontified for a fraction of a
>> > second.
>> 
>> I think that a separate value of 0 where is one not willing to see
>> text unfontified, but willing to have motion calculated with a
>> still unfontified text, would make perfect sense.
>
> jit-lock-defer-time works by setting up an idle timer.  Will
> run-with-idle-timer work if you give it a zero time-out?

Without looking at the code, it would be my guess that it would
currently run immediately after redisplay, whereas my suggestion for
jit-lock-defer-time=0 semantics would be that it be run immediately
before redisplay.

> And fontification of the visible portion will take time during which
> one still sees unfontified text, anyway.

Not if it happens before redisplay.  As I said, I think this would
make perfect sense for this setting.  If we want to differentiate for
some reason between immediately before and immediately after
redisplay, it would also be possible to use a negative value for "just
before redisplay" and 0 for "just after redisplay".

It would possibly make sense to implement this distinction in the
context of run-with-idle-timer, and then let jit-lock-defer-time just
use it by defaulting to -1.

Again: I have not looked at the code.  It just appears to me that this
would seem sensible behavior, and it would be nice to have an option
to tell jit-lock not to bother fontifying stuff unless it is actually
going to display it.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-04-26 22:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-23 16:16 C-n is very slow in Font-Lock mode Richard Stallman
2005-04-23 20:17 ` Eli Zaretskii
2005-04-24 21:23   ` Richard Stallman
2005-04-24 21:50     ` Eli Zaretskii
2005-04-26 10:05       ` Richard Stallman
2005-04-26 10:27         ` David Kastrup
2005-04-26 22:56           ` Richard Stallman
2005-04-27  8:59             ` Kim F. Storm
2005-04-27  9:57               ` Eli Zaretskii
2005-04-27 12:27                 ` Kim F. Storm
2005-04-27  9:06             ` Eli Zaretskii
2005-04-28 11:00               ` Richard Stallman
2005-04-26 18:05         ` Eli Zaretskii
2005-04-26 21:38           ` David Kastrup
2005-04-26 22:43             ` Eli Zaretskii
2005-04-26 22:57               ` David Kastrup [this message]
2005-04-27  9:19                 ` Eli Zaretskii
2005-04-27  9:43                   ` David Kastrup
2005-04-27 10:17                     ` Eli Zaretskii
2005-04-27 11:32                       ` David Kastrup
2005-04-27 11:59                         ` Eli Zaretskii
2005-04-27 12:23                           ` David Kastrup
2005-04-27 12:32                           ` Kim F. Storm
2005-04-28 11:00                             ` Richard Stallman
2005-04-28 12:16                               ` David Kastrup
2005-04-28 11:00                         ` 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

  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=85hdhtf8ou.fsf@lola.goethe.zz \
    --to=dak@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 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).