From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Sat, 13 Aug 2022 17:25:20 +0300 Message-ID: <83a688md9r.fsf@gnu.org> References: <92da07bd028e3ede61a6@heytings.org> <47894c57-dd8b-5778-240a-3fa6540e4d37@yandex.ru> <92da07bd02941d5537e9@heytings.org> <5308e3b5-a160-17d7-77ee-b1d00acfa20d@yandex.ru> <92da07bd02a6cc861e1a@heytings.org> <837d3lzv8n.fsf@gnu.org> <2c8d6755-cfe2-6559-3fde-3fa30ffb411e@yandex.ru> <83mtcgy44k.fsf@gnu.org> <83k07jx5jn.fsf@gnu.org> <866e510d-a060-7daa-d002-97861d056fa7@yandex.ru> <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <83y1vtmjld.fsf@gnu.org> <8868631660327773@iva2-775ff39c77bc.qloud-c.yandex.net> <83pmh4n0t8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, dgutov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 13 16:26:40 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMs63-0008HP-QO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 16:26:39 +0200 Original-Received: from localhost ([::1]:51890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMs62-0005sS-Qi for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 10:26:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMs5T-0005XF-Dm for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMs5T-0005Bg-57 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMs5T-0000OP-0R for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 10:26:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Aug 2022 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.16604007521486 (code B ref 56682); Sat, 13 Aug 2022 14:26:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 13 Aug 2022 14:25:52 +0000 Original-Received: from localhost ([127.0.0.1]:34819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMs5I-0000Nu-Fm for submit@debbugs.gnu.org; Sat, 13 Aug 2022 10:25:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMs5D-0000NR-A3 for 56682@debbugs.gnu.org; Sat, 13 Aug 2022 10:25:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMs52-00058T-So; Sat, 13 Aug 2022 10:25:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ah46eHUnLbHj17+dd7WfF4b1OH461VkikIXRjMWqICw=; b=CFXJcaehy9YT rD2uybAhsOfPKTlDvjGpbHYpigwV5mMUvdEcwh1VQU5gq3eyJXwkYFwEDnSy5xgx6qpz+aEHG+86a Xt2wt326Npd+3LChuGpb/CEtPTDh0Q6rZhB2vjMz2sk2i65jpFUu4Q8C4U4QvRfYnVr54Sei4V0t/ 2+32P35XI7Ik9YiGYDjxuI5ZaKnJO8/eBAIBAZpqF2b9Oe7Bc7sDBdzVHkejY9Rj2krE1lDvo9pqO tC9s4X45LKZebcTvP/rU2xyM7TLHuyvB1CYI/RfUvQA5KYeGIrNS4CQsk7fykX75jPnkv3VvWcBtH i+BHlhu7iM37w+Vgcgq/nQ==; Original-Received: from [87.69.77.57] (port=4227 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMs50-0007SD-IY; Sat, 13 Aug 2022 10:25:36 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 13 Aug 2022 09:37:06 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:239551 Archived-At: > From: Stefan Monnier > Cc: Gregory Heytings , dgutov@yandex.ru, > 56682@debbugs.gnu.org > Date: Sat, 13 Aug 2022 09:37:06 -0400 > > > Is 20MB single-line JSON file fairly representative of such files out > > there? Do we know of JSON file with much longer lines, for example > > 50MB or 100MB? > > IIUC it's very common for JSON files to be made of a single line, so the > line length is the file's length and since those files are > machine-generated I don't expect 100MB to be much less common than 20MB. I think I'd prefer some actual data points. It's clear that larger JSON files can happen, the question is how frequently they do happen. > > If 20MB is reasonably representative of the long-line JSON, then > > perhaps at least json-mode could consider resetting > > long-line-threshold to nil. > > IIUC a nil value for `long-line-threshold` makes Emacs completely > unusable with such long lines even if you disable all the bells > and whistles. Dmitry's suggestion is to skip the locked-narrowing in > some cases, but not to set `long-line-threshold` to nil. That's what I actually meant. However, if much larger JSON files exist, we should first see what that proposal produces with such larger files.