unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ralf Angeli <angeli@iwi.uni-sb.de>
Cc: emacs-devel@gnu.org
Subject: Re: Stealth fontification GCs a lot
Date: Fri, 15 Apr 2005 11:12:37 +0200	[thread overview]
Message-ID: <E1DMMsP-00033o-OB@neutrino.iwi.uni-sb.de> (raw)
In-Reply-To: <01c54195$Blat.v2.4$2cd7cd40@zahav.net.il> (Eli Zaretskii's message of "Fri, 15 Apr 2005 11:27:57 +0300")

* Eli Zaretskii (2005-04-15) writes:

>> From: Ralf Angeli <angeli@iwi.uni-sb.de>
>> Date: Thu, 14 Apr 2005 13:25:27 +0200
>> 
>> A worse annoyance of stealth fontification is that this happens
>> again and again after every modification of the buffer.
>
> In practice, such re-fontification ends very quickly.  So I don't
> understand why it is an annoyance for you; can you give a specific
> example?

I mostly seeing this in large LaTeX files.  As an example, create a
new .tex file and copy the following lines repeatedly without blank
lines in between into the buffer until you have, say, 10.000 lines:

\newcommand{\mycontent}{\ensuremath{\lambda_{1}}}%
\begin{itemize}%
\item
  \begin{align*}%
    \left\{
      \begin{array}{l}
        b_{c} \text{some long line with $\mycontent$}
      \end{array}
    \right\}
  \end{align*}%
\end{itemize}%

If you want to test this in clean room conditions, save the file,
start an Emacs instance with `emacs -Q', open the file, type `M-x
font-lock-mode RET' and wait.  It's good to have something handy for
monitoring the CPU usage, e.g. top or the CPU meter of GKrellM.  Now
wait for a few seconds until the initial stealth fontification starts.
You should see that CPU usage is growing until the whole buffer is
fontified.  In order to see the effect of re-fontification after a
change (which is done only from the point of change downwards and not
for the whole buffer as already mentioned in the reply to Richard),
insert a random character somewhere at the start of the buffer and
wait again until stealth fontification starts.  This second
fontification pass takes nearly as long as the first because of the
change in the buffer happening near its top.

-- 
Ralf

  reply	other threads:[~2005-04-15  9:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DLrVe-00055D-2l@monty-python.gnu.org>
2005-04-14  4:17 ` Stealth fontification GCs a lot Jonathan Yavner
2005-04-14  6:20   ` Miles Bader
2005-04-14  9:39     ` David Kastrup
2005-04-14 11:25     ` Ralf Angeli
2005-04-15  2:44       ` Richard Stallman
2005-04-15  6:47         ` Ralf Angeli
2005-04-16  2:57           ` Richard Stallman
2005-04-15  8:27       ` Eli Zaretskii
2005-04-15  9:12         ` Ralf Angeli [this message]
2005-04-14 19:04   ` Richard Stallman
2005-04-15  8:50   ` Eli Zaretskii
2005-04-11  1:57 Richard Stallman
2005-04-11  3:40 ` Stefan Monnier
2005-04-11 22:22   ` Eli Zaretskii
2005-04-12 17:25     ` Richard Stallman
2005-04-12 18:55       ` Eli Zaretskii
2005-04-12 19:52         ` Stefan Monnier
2005-04-13 17:29           ` Eli Zaretskii
2005-04-13 17:56             ` Stefan Monnier
2005-04-13 23:41               ` Miles Bader
2005-04-14 16:21             ` Richard Stallman
2005-04-13 18:30           ` Richard Stallman
2005-04-13 21:24             ` Aidan Kehoe
2005-04-13 22:25               ` Stefan Monnier
2005-04-14  3:59             ` Eli Zaretskii
2005-04-14 19:03               ` Richard Stallman
2005-04-15  8:34                 ` Eli Zaretskii
2005-04-13 18:31         ` Richard Stallman
2005-04-14  3:57           ` Eli Zaretskii
2005-04-14 19:03             ` Richard Stallman
2005-04-23 12:49               ` Eli Zaretskii
2005-04-12  2:59   ` Richard Stallman
2005-04-12  8:29     ` Ralf Angeli
2005-04-13  5:02       ` Richard Stallman
2005-04-13 11:37         ` Ralf Angeli
2005-04-14 16:20           ` Richard Stallman
2005-04-14 16:53             ` Ralf Angeli

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=E1DMMsP-00033o-OB@neutrino.iwi.uni-sb.de \
    --to=angeli@iwi.uni-sb.de \
    --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).