From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: Syntax Highlighting Latency in Emacs Date: Mon, 13 Dec 2004 13:08:07 +0100 Message-ID: <864qiqqu3c.fsf@ketchup.de.uu.net> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102941068 30755 80.91.229.6 (13 Dec 2004 12:31:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Dec 2004 12:31:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 13 13:31:03 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cdp6d-0004ZY-00 for ; Mon, 13 Dec 2004 13:15:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CdpGj-0001Ta-BQ for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Dec 2004 07:25:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CdpGR-0001TQ-TA for help-gnu-emacs@gnu.org; Mon, 13 Dec 2004 07:25:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CdpGR-0001T0-1z for help-gnu-emacs@gnu.org; Mon, 13 Dec 2004 07:25:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CdpGQ-0001Sx-UR for help-gnu-emacs@gnu.org; Mon, 13 Dec 2004 07:25:19 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cdp3D-0004rP-10 for help-gnu-emacs@gnu.org; Mon, 13 Dec 2004 07:11:39 -0500 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Cdp3B-0005N2-00 for ; Mon, 13 Dec 2004 13:11:37 +0100 Original-Received: from ketchup.de.uu.net ([139.4.38.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Dec 2004 13:11:37 +0100 Original-Received: from kai by ketchup.de.uu.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Dec 2004 13:11:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 23 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ketchup.de.uu.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:ayuroN9dyp4v9UaUEMpDcA1l1ak= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22702 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22702 jab3 writes: > I don't want to start a war or anything (because it probably has something > to do with my system), but I am curious about something I've noticed with > Emacs as compared with vim. If I'm looking at a source code file in vim, > (and it doesn't even have to be that large - maybe a few thousand K) the > syntax highlighting is automatic. And if I edit something, which changes > the highlighting of the rest of the file, it is instantaneous. But in > Emacs, there is a 2 or 3 second delay in the updating of the highlighting. I think Emacs now uses jit-lock as the font-lock-support-mode. This exhibits the symptoms you're mentioning. You can also turn off font-lock-support-mode completely, then font-locking should be instantaneous. However, then you also have to wait long after opening a large file, because font-lock then goes through and fontifies the whole file. (lazy-lock is another alternative for font-lock-support-mode which works similarly to jit-lock but is implemented in Lisp.) Of course, there are various tunables, as others have mentioned. Kai