From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: Stealth fontification GCs a lot Date: Fri, 15 Apr 2005 11:12:37 +0200 Message-ID: References: <200504140017.50453.jyavner@member.fsf.org> <01c54195$Blat.v2.4$2cd7cd40@zahav.net.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113558845 6914 80.91.229.2 (15 Apr 2005 09:54:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2005 09:54:05 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 15 11:54:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DMNVq-0006lv-4o for ged-emacs-devel@m.gmane.org; Fri, 15 Apr 2005 11:53:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DMNZJ-00023T-2n for ged-emacs-devel@m.gmane.org; Fri, 15 Apr 2005 05:56:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DMMy9-0003ZR-8Z for emacs-devel@gnu.org; Fri, 15 Apr 2005 05:18:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DMMwk-00030r-B4 for emacs-devel@gnu.org; Fri, 15 Apr 2005 05:17:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DMMuG-0002TX-Jz for emacs-devel@gnu.org; Fri, 15 Apr 2005 05:14:34 -0400 Original-Received: from [134.96.7.25] (helo=triton.rz.uni-saarland.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DMMtO-00058J-DM; Fri, 15 Apr 2005 05:13:39 -0400 Original-Received: from iwi-gate.iwi.uni-sb.de (iwi-gate.iwi.uni-sb.de [134.96.72.13]) by triton.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id j3F9Ckwx6182108; Fri, 15 Apr 2005 11:12:46 +0200 (CEST) Original-Received: from [134.96.72.190] (helo=neutrino.iwi.uni-sb.de) by iwi-gate.iwi.uni-sb.de with esmtp (Exim 4.43 (FreeBSD)) id 1DMMsO-0009uJ-Do; Fri, 15 Apr 2005 11:12:36 +0200 Original-Received: from angeli by neutrino.iwi.uni-sb.de with local (Exim 4.50) id 1DMMsP-00033o-OB; Fri, 15 Apr 2005 11:12:37 +0200 Original-To: Eli Zaretskii In-Reply-To: <01c54195$Blat.v2.4$2cd7cd40@zahav.net.il> (Eli Zaretskii's message of "Fri, 15 Apr 2005 11:27:57 +0300") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) X-IWi-MailScanner-Information: Please contact the ISP for more information X-IWi-MailScanner: Found to be clean X-IWi-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5, autolearn=disabled) X-MailScanner-From: angeli@iwi.uni-sb.de X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Fri, 15 Apr 2005 11:12:46 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.30.0.7; VDF 6.30.0.98 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36021 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36021 * Eli Zaretskii (2005-04-15) writes: >> From: Ralf Angeli >> 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