From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca
Subject: Re: [rudalics@gmx.at: Re: jit lock sit-for provokes redisplay provokes imenu]
Date: Thu, 31 Aug 2006 08:11:12 +0200 [thread overview]
Message-ID: <44F67D80.4010800@gmx.at> (raw)
In-Reply-To: <87u03tkasn.fsf@furball.mit.edu>
> martin rudalics <rudalics@gmx.at> writes:
>
>
>>>Stefan wrote:
>>>
>>> This only eliminates one particular source of unwanted updates. I don't
>>> think this code is worth the trouble.
>>>
>>>That cause of unwanted updates is the only one we know of. Nothing
>>>else is likely to change the buffer in the background.
>>
>>`jit-lock-fontify-now' during scrolling, searching, window resizing.
>>Not mentioning the plethora of "hidden buffer changes" in c-mode.
>
>
> AFAIU, those are much less problematic than the changes during stealth
> fontification. That's because stealth fontification takes place in a
> timer, while Emacs is idle, and makes a change every 0.5 seconds (by
> default).
Not since we changed `jit-lock-stealth-fontify'. Remember: The old call
chain was `jit-lock-stealth-fontify' -> `sit-for' -> `sit_for' ->
`redisplay_preserve_echo_area' -> `redisplay_internal' ->
`prepare_menu_bars' -> `update_menu_bar' with the notorious
`windows_or_buffers_changed' check and the subsequent run of
`Qmenu_bar_update_hook' which contains `imenu-update-menubar'.
But we _removed_ `sit-for' from `jit-lock-stealth-fontify' and hence
stealth fontification doesn't redisplay anymore. That's been my entire
motivation for patching this. I think, most people complaining about
stealth fontification overhead in fact complained about those senseless
_redisplays_ stealth fontification's `sit-for' incurred every 0.5 secs.
(Compare the current "silent PC vs. emacs" thread on emacs-pretest-bug.)
Hence the only overhead incurred by stealth fontification nowadays
should be due to the fact that it "modified" the buffer, the user (or
process output) interrupted stealth fontifcation, and as a consequence
`imenu-update-menubar' is run. We can ignore that.
The buffer changes during scrolling and window resizing, however, are
considerably more serious since they affect responsiveness of Emacs. My
Emacs considerably lags behind other applications during scrolling and
flickers noticeably whenever I drag a modeline. Now consider that for
every _single_ line dragged or scrolled I call `imenu-update-menubar'.
The only buffer "change" here is the fontification of one single line.
That doesn't make any sense. And it makes the speed of scrolling depend
(1) on the size of the buffer and (2) the quality of a thing like
`imenu-create-index-function'. Wouldn't it make more sense to spend
that time to filter out, for example, all those definitions Imenu finds
in C comments or strings?
next prev parent reply other threads:[~2006-08-31 6:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 9:52 [rudalics@gmx.at: Re: jit lock sit-for provokes redisplay provokes imenu] Richard Stallman
2006-08-28 10:01 ` David Kastrup
2006-08-28 11:47 ` Kim F. Storm
2006-08-29 17:18 ` Richard Stallman
2006-08-28 16:22 ` Chong Yidong
2006-08-28 16:44 ` Stefan Monnier
2006-08-29 11:47 ` Richard Stallman
2006-08-30 2:43 ` Chong Yidong
2006-08-30 3:41 ` Stefan Monnier
2006-08-30 7:52 ` Kim F. Storm
2006-08-31 0:28 ` Chong Yidong
2006-08-31 4:01 ` Stefan Monnier
2006-08-30 17:59 ` Richard Stallman
2006-08-30 18:29 ` martin rudalics
2006-08-31 0:29 ` Chong Yidong
2006-08-31 6:11 ` martin rudalics [this message]
2006-08-31 7:49 ` Kim F. Storm
2006-08-31 13:12 ` Chong Yidong
2006-08-31 22:57 ` Richard Stallman
2006-09-01 13:42 ` Chong Yidong
2006-08-31 18:16 ` Richard Stallman
2006-09-01 6:41 ` martin rudalics
2006-09-01 12:47 ` Richard Stallman
2006-08-30 20:49 ` Stefan Monnier
2006-08-31 18:16 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F67D80.4010800@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--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 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.