From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.devel
Subject: Re: Making font-lock handle long lines better
Date: Fri, 10 Feb 2017 18:24:48 +0200
Message-ID: <83wpcy2eun.fsf@gnu.org>
References: <CA+caGh_JN9FRi71VjUTwvYBKKygG-KuGGoe3GBgjthPRh00nRg@mail.gmail.com>
Reply-To: Eli Zaretskii <eliz@gnu.org>
NNTP-Posting-Host: blaine.gmane.org
X-Trace: blaine.gmane.org 1486743936 23727 195.159.176.226 (10 Feb 2017 16:25:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 10 Feb 2017 16:25:36 +0000 (UTC)
Cc: emacs-devel@gnu.org
To: Ryan B <public@ryanb.org>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 10 17:25:31 2017
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1ccE0n-0005jn-9Y
	for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2017 17:25:29 +0100
Original-Received: from localhost ([::1]:44690 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1ccE0s-00060Z-KV
	for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2017 11:25:34 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48631)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eliz@gnu.org>) id 1ccE05-0005yr-8M
	for emacs-devel@gnu.org; Fri, 10 Feb 2017 11:24:46 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eliz@gnu.org>) id 1ccE00-0002jb-9W
	for emacs-devel@gnu.org; Fri, 10 Feb 2017 11:24:45 -0500
Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47601)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>)
	id 1ccE00-0002jX-67; Fri, 10 Feb 2017 11:24:40 -0500
Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4978
	helo=home-c4e4a596f7)
	by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
	(Exim 4.82) (envelope-from <eliz@gnu.org>)
	id 1ccDzz-0007w7-Fx; Fri, 10 Feb 2017 11:24:39 -0500
In-reply-to: <CA+caGh_JN9FRi71VjUTwvYBKKygG-KuGGoe3GBgjthPRh00nRg@mail.gmail.com>
	(message from Ryan B on Fri, 10 Feb 2017 07:44:15 -0800)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:212210
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/212210>

> From: Ryan B <public@ryanb.org>
> Date: Fri, 10 Feb 2017 07:44:15 -0800
> 
> hi all! it seems like it's been a known issue for a while that font-lock is slow on very long lines. i've tried lots of
> optimizations - jit-lock/lazy-lock, font-lock-maximum-decoration, etc. - but even on modern hardware,
> fontifying still hangs my emacs for 5-10s on long lines, e.g. 10k-20k characters, whenever they appear. 
> 
> i'm thinking of adding an opt-in line length limit to font-lock-mode, after which it would stop fontifying, evaluating
> regexps, etc. within each line. i'd love to hear opinions on whether that makes sense, and whether you might
> consider accepting it into trunk.

Please file a bug report by sending this information using
report-emacs-bug.  If you can attach to your report a minimal test
case that exhibits the problematic behavior, it will be appreciated.

Thanks.