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: Thu, 14 Apr 2005 18:53:40 +0200 Message-ID: <200504141653.j3EGrfNC004234@neutrino.iwi.uni-sb.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113501753 10510 80.91.229.2 (14 Apr 2005 18:02:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2005 18:02:33 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 14 20:02:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DM8da-0002R3-6y for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2005 20:00:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DM8gv-0005k5-FG for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2005 14:03:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DM8bu-0004VL-0N for emacs-devel@gnu.org; Thu, 14 Apr 2005 13:58:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DM8bm-0004Rq-1e for emacs-devel@gnu.org; Thu, 14 Apr 2005 13:58:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DM8bj-0004OU-UD for emacs-devel@gnu.org; Thu, 14 Apr 2005 13:58:29 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DM8UG-0000jG-OA; Thu, 14 Apr 2005 13:50:44 -0400 Original-Received: from [134.96.7.31] (helo=justus.rz.uni-saarland.de) by mx20.gnu.org with esmtp (Exim 4.34) id 1DM7bS-0002jb-U1; Thu, 14 Apr 2005 12:54:07 -0400 Original-Received: from iwi-gate.iwi.uni-sb.de (iwi-gate.iwi.uni-sb.de [134.96.72.13]) by justus.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id j3EGrshk7327999; Thu, 14 Apr 2005 18:53:54 +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 1DM7b2-0007qV-09; Thu, 14 Apr 2005 18:53:40 +0200 Original-Received: from neutrino.iwi.uni-sb.de (localhost [127.0.0.1]) by neutrino.iwi.uni-sb.de (8.13.3/8.13.1) with ESMTP id j3EGrfPN004235; Thu, 14 Apr 2005 18:53:41 +0200 (CEST) (envelope-from angeli@iwi.uni-sb.de) Original-Received: (from angeli@localhost) by neutrino.iwi.uni-sb.de (8.13.3/8.13.1/Submit) id j3EGrfNC004234; Thu, 14 Apr 2005 18:53:41 +0200 (CEST) (envelope-from angeli@iwi.uni-sb.de) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 14 Apr 2005 12:20:53 -0400") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (berkeley-unix) 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 (justus.rz.uni-saarland.de [134.96.7.31]); Thu, 14 Apr 2005 18:53:55 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.30.0.7; VDF 6.30.0.96 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:35983 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35983 * Richard Stallman (2005-04-14) writes: > But I see your point and I'll check if forcing the whole buffer to be > fontified before folding leads to bearable execution times. > > If it is too slow, here's another possible idea: explicitly handle > precisely and only the part of fontification that is needed for the > other features to work. That might be substantially faster. Hm, I don't see an easy way to determine such a subset. A possibility could be to call `font-lock-fontify-region' only on the regions to be folded. But this may lead to wrong results in case there are constructs enclosing such regions which would influence fontification. I already commited a patch to AUCTeX's CVS. The function responsible for folding a buffer now calls `jit-lock-fontify-now' in case jit-lock-mode is active and the function is available. In the tests I did, the increase of execution time for folding a buffer was barely noticeable. In case people will have problems with it, there is a switch to inhibit forced fontification. Thanks for your suggestions. -- Ralf