From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: C-n is very slow in Font-Lock mode Date: Wed, 27 Apr 2005 00:57:05 +0200 Message-ID: <85hdhtf8ou.fsf@lola.goethe.zz> References: <01c54841$Blat.v2.4$8f503680@zahav.net.il> <01c54917$Blat.v2.4$b975aea0@zahav.net.il> <01c54a8a$Blat.v2.4$9d6aeda0@zahav.net.il> <85mzrlgqws.fsf@lola.goethe.zz> <01c54ab1$Blat.v2.4$91328080@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 1114556248 19575 80.91.229.2 (26 Apr 2005 22:57:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2005 22:57:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 27 00:57:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQYz9-0006jx-6C for ged-emacs-devel@m.gmane.org; Wed, 27 Apr 2005 00:56:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQZ4x-0007cH-Bz for ged-emacs-devel@m.gmane.org; Tue, 26 Apr 2005 19:02:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQZ2E-0007B5-P9 for emacs-devel@gnu.org; Tue, 26 Apr 2005 19:00:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQZ2C-0007Ak-To for emacs-devel@gnu.org; Tue, 26 Apr 2005 19:00:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQZ2C-0006fU-Fj for emacs-devel@gnu.org; Tue, 26 Apr 2005 19:00:04 -0400 Original-Received: from [151.189.21.44] (helo=mail-in-04.arcor-online.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DQZ3P-0007qb-R3; Tue, 26 Apr 2005 19:01:20 -0400 Original-Received: from lola.goethe.zz (i5387859C.versanet.de [83.135.133.156]) by mail-in-04.arcor-online.net (Postfix) with ESMTP id B044D105222; Wed, 27 Apr 2005 00:57:21 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id C81FD1C1E25E; Wed, 27 Apr 2005 00:57:05 +0200 (CEST) Original-To: Eli Zaretskii In-Reply-To: <01c54ab1$Blat.v2.4$91328080@zahav.net.il> (Eli Zaretskii's message of "Wed, 27 Apr 2005 01:43:52 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:36431 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36431 "Eli Zaretskii" writes: >> Cc: rms@gnu.org, emacs-devel@gnu.org >> From: David Kastrup >> 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