From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Tue, 16 Aug 2022 09:43:56 -0400 Message-ID: References: <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> <66bbbb95983414e79637@heytings.org> <83wnb9hadb.fsf@gnu.org> <395454dd-7238-c5d0-e924-2f65a186baa7@yandex.ru> <83r11hh4pm.fsf@gnu.org> <3a1232a17b09ce88af40@heytings.org> <4ebdfdc3-4aeb-7ebb-b5ba-43b5c9b0aaa1@yandex.ru> <3a1232a17b80387503f4@heytings.org> <881ac6c7-116c-49d0-8f19-4a3778260914@yandex.ru> <3a1232a17b37db7a2498@heytings.org> <3a1232a17bf656136616@heytings.org> <325f95fd2b09b959fddd@heytings.org> <325f95fd2b33afdbb5e6@heytings.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3449"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Dmitry Gutov To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 16 15:45:47 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 1oNwt8-0000ea-M1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 15:45:46 +0200 Original-Received: from localhost ([::1]:46912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNwt5-00073A-Uh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 09:45:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNwsQ-00072l-M4 for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 09:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNwsQ-0005Ui-DI for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 09:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNwsQ-0003qT-9M for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 09:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Aug 2022 13:45: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.166065744714695 (code B ref 56682); Tue, 16 Aug 2022 13:45:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 16 Aug 2022 13:44:07 +0000 Original-Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNwrX-0003ox-4H for submit@debbugs.gnu.org; Tue, 16 Aug 2022 09:44:07 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNwrU-0003oK-Ic for 56682@debbugs.gnu.org; Tue, 16 Aug 2022 09:44:04 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1760A8076B; Tue, 16 Aug 2022 09:43:59 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C7C0680070; Tue, 16 Aug 2022 09:43:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660657437; bh=IDvbuoRamylrgtRwnvGt6X4V1/uL+h++sqTfnLBchXQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eB2FLO/SCGiHtXTvQrqS1vp7LlqPAHgYtFm81FDjfxnSjUC7otO9Rw1LszLvpd/1H EvPXmVyOcQu7JLoMSUQ/Xn16kiAaNx9n5kt/saIp4MdYAIzdsm0vGM+Sqi2sGteYDb 6tBy4kAhQ5+UgtUqsfRt+FkAdpr16/vPwVA8aS1RdtOYjRJDu3lFdStZKkmoyWZYr6 oMLiaVtYzsfSw1aREVjdHtv4lLWn3sd2wa9oxB8JupKrW4f5Xlig5WAwJoTWOfz2Gm eAkZXyGhECb2ql+hXlYjA1VJ6/XMpUdfoyijf43KDgzb7CrfWgXAt5n7/+OijGxnOA 4nNUzlrga2pFg== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97B2F12030A; Tue, 16 Aug 2022 09:43:57 -0400 (EDT) In-Reply-To: <325f95fd2b33afdbb5e6@heytings.org> (Gregory Heytings's message of "Tue, 16 Aug 2022 08:21:45 +0000") 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:239940 Archived-At: >>>>>> There have been many more complaints about being unable to edit a file >>>>>> with a 5000+ line comfortably, than about editing 100+ MB files. >>>>> Also because we have things like so-long to handle the large file case. >>>> These things are expedients for want of anything better, aren't they? >>> Yes, just like the narrowing your use in your long lines patch. >> That's... unfair. These things turn off everything (in particular, the >> major mode and font locking) and provide a bare-bones editing >> experience. What we'd like now is to provide Emacs users a near-complete >> editing experience in all buffers. > And, by the way, what could be a better solution? A solution that is humble enough to leave an open door for ad-hoc case-specific handling of the problem. > Without assuming that computers have infinitely fast CPUs, that is? If the font-lock rules to use in the buffer depend on whether the first line of the buffer starts with #! or not, then your narrowing will break them even tho they could work perfectly fine in a 1TB buffer without requiring an infinitely fast CPU (since they don't need to scan the whole buffer: just the region of interest plus the first 2 chars). Stefan