From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: C-n is very slow in Font-Lock mode Date: Sat, 23 Apr 2005 23:17:03 +0300 Message-ID: <01c54841$Blat.v2.4$8f503680@zahav.net.il> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1114287468 24332 80.91.229.2 (23 Apr 2005 20:17:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2005 20:17:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 23 22:17:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DPR4K-0004cl-T7 for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2005 22:17:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPR9W-0000b7-48 for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2005 16:22:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DPR9M-0000ZI-8c for emacs-devel@gnu.org; Sat, 23 Apr 2005 16:22:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DPR9L-0000Z3-Np for emacs-devel@gnu.org; Sat, 23 Apr 2005 16:22:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPR9L-0000N4-Km for emacs-devel@gnu.org; Sat, 23 Apr 2005 16:22:47 -0400 Original-Received: from [192.114.186.24] (helo=legolas.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DPR8I-0003lO-KK; Sat, 23 Apr 2005 16:21:42 -0400 Original-Received: from zaretski (IGLD-80-230-73-48.inter.net.il [80.230.73.48]) by legolas.inter.net.il (MOS 3.5.6-GR) with ESMTP id EFO08563 (AUTH halo1); Sat, 23 Apr 2005 23:18:27 +0300 (IDT) Original-To: rms@gnu.org X-Mailer: emacs 22.0.50 (via feedmail 8 I) and Blat ver 2.4 In-reply-to: (message from Richard Stallman on Sat, 23 Apr 2005 12:16:35 -0400) 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:36308 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36308 > From: Richard Stallman > Date: Sat, 23 Apr 2005 12:16:35 -0400 > > With Font-Lock mode enabled, starting from the beginning of a large > file (such as fileio.c), C-n with a large argument (I tried C-u 2536 > C-n) took many seconds. I think it was fontifying all the text > that it moved across. Probably. JIT lock fontifies any portion of a buffer that is becoming visible, and C-n makes visible all parts of the buffer it moves across, one page at a time. > Can this be avoided? I don't think C-n ought to need to fontify > all that text. Try setting jit-lock-defer-time to a non-nil value. Anyway, C-n is a very inefficient method of paging through a buffer. If you want to move 2536 lines, you will be better off using goto-line or C-v. JIT lock is optimized for C-v and similar methods that page by large chunks of text rather than by one line. > Even once it has fontified, the command still takes a lot longer > with Font-Lock mode enabled than it does with Font-Lock disabled. I'm guessing this is because the display engine looks up all the text properties put on the text by font-lock.