From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ryan B Newsgroups: gmane.emacs.devel Subject: Making font-lock handle long lines better Date: Fri, 10 Feb 2017 07:44:15 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11439dac21657005482efa96 X-Trace: blaine.gmane.org 1486741781 25808 195.159.176.226 (10 Feb 2017 15:49:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Feb 2017 15:49:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 10 16:49:38 2017 Return-path: 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 ) id 1ccDS4-0006Ml-J4 for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2017 16:49:36 +0100 Original-Received: from localhost ([::1]:44538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccDSA-0008Nn-A9 for ged-emacs-devel@m.gmane.org; Fri, 10 Feb 2017 10:49:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccDNW-0005hJ-Rb for emacs-devel@gnu.org; Fri, 10 Feb 2017 10:44:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccDNR-0006Pt-SB for emacs-devel@gnu.org; Fri, 10 Feb 2017 10:44:54 -0500 Original-Received: from smtp1.cs.stanford.edu ([171.64.64.25]:45573) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ccDNR-0006P0-KY for emacs-devel@gnu.org; Fri, 10 Feb 2017 10:44:49 -0500 Original-Received: from mail-vk0-f41.google.com ([209.85.213.41]:34652) by smtp1.cs.Stanford.EDU with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.88) (envelope-from ) id 1ccDNO-0002hD-Ej for emacs-devel@gnu.org; Fri, 10 Feb 2017 07:44:47 -0800 Original-Received: by mail-vk0-f41.google.com with SMTP id r136so28166294vke.1 for ; Fri, 10 Feb 2017 07:44:46 -0800 (PST) X-Gm-Message-State: AMke39mwJn4hym8dHruL2opbovlV3D1qcO/xhCpGkBQssOcns15WeZxkNPu3/U2VcqcmVTLxgrRNxcWh1il6lA== X-Received: by 10.31.183.136 with SMTP id h130mr4622615vkf.131.1486741485738; Fri, 10 Feb 2017 07:44:45 -0800 (PST) Original-Received: by 10.176.65.134 with HTTP; Fri, 10 Feb 2017 07:44:15 -0800 (PST) X-Gmail-Original-Message-ID: X-Scan-Signature: 2e2010fe0da008b9f5e122b86dc99621 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 171.64.64.25 X-Mailman-Approved-At: Fri, 10 Feb 2017 10:49:08 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212208 Archived-At: --001a11439dac21657005482efa96 Content-Type: text/plain; charset=UTF-8 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. thanks in advance! -- https://snarfed.org/ --001a11439dac21657005482efa96 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hi all! it seems like it's been a known issu= e for a while that font-lock is slow on very long lines. i've tried lot= s of optimizations - jit-lock/lazy-lock, font-lock-maximum-decoration, etc.= - but even on modern hardware, fontifying still hangs my emacs for 5-10s o= n 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, a= fter which it would stop fontifying, evaluating regexps, etc. within each l= ine. i'd love to hear opinions on whether that makes sense, and whether= you might consider accepting it into trunk.

thanks in advance= !
--001a11439dac21657005482efa96--