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: Wed, 27 Jul 2022 05:33:27 +0300 Message-ID: <83sfmnb7yg.fsf@gnu.org> References: <837d46mjen.fsf@gnu.org> <174616cd5c33bfc14b1f@heytings.org> <837d44jr4p.fsf@gnu.org> <83bktghrn0.fsf@gnu.org> <8a3eaeef010995a5da8d@heytings.org> <837d40ds09.fsf@gnu.org> <83zggwcby5.fsf@gnu.org> <83o7xccagi.fsf@gnu.org> <831qu7daxb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca To: gerd.moellmann@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 27 04:34:16 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 1oGWsJ-0002rM-Qc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Jul 2022 04:34:16 +0200 Original-Received: from localhost ([::1]:46366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGWsI-0003bN-D1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 22:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGWs7-0003az-0M for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 22:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGWs6-0002Wh-Ny for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 22:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGWs6-0000eU-Fk for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 22:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jul 2022 02:34: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.16588892082452 (code B ref 56682); Wed, 27 Jul 2022 02:34:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 27 Jul 2022 02:33:28 +0000 Original-Received: from localhost ([127.0.0.1]:54690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGWrY-0000dU-H5 for submit@debbugs.gnu.org; Tue, 26 Jul 2022 22:33:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGWrX-0000dG-6s for 56682@debbugs.gnu.org; Tue, 26 Jul 2022 22:33:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGWrR-0002TQ-MA; Tue, 26 Jul 2022 22:33:21 -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=WPL+1FGM+pTzOpYFF65eGJ8P6MQioxv7aSbo+NIBiVg=; b=Y8729nfnDs+q Z3LuX3MnwIpEjXSZaRGI4mprmwvfTMMDFMqiif9DoDeW/FpTUPS9DGJJkPFv89z6m/cSFgm4I/rKK rYDgWVS/w7NeNf4ph61H9Td6bgsxd5aYefD2hSQ70bsScoQUrnrP4xn/Q1qqkfyfNGqMWIIjbfc48 oXaOELa+MaELQ77mB7Rc5dQZ5vgWsixZswY1rpEg40QyDiaCBjQscsSCm7BRgoV1jGciAUzk+Kmjq r6RaeXQ2xlebt1BswZDyQVMX+dItoSHypgmlqBSJdQfPyi1QVdtbBN7FQ6XcyICnjWVcsGvJW9lAR 0Dj8LhxFS+jusD5r5tLwrw==; Original-Received: from [87.69.77.57] (port=1865 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 1oGWrR-0007ZD-6I; Tue, 26 Jul 2022 22:33:21 -0400 In-Reply-To: <831qu7daxb.fsf@gnu.org> (message from Eli Zaretskii on Tue, 26 Jul 2022 20:46:24 +0300) 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:237994 Archived-At: > Cc: 56682@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Tue, 26 Jul 2022 20:46:24 +0300 > From: Eli Zaretskii > > At this point, I think the only way to produce reasonable performance > from C-s in this case is to turn off lazy-highlighting when lines are > truncated and the buffer has long lines. Which means we need to > expose the value of long_line_optimizations_p to Lisp, via an accessor > function. I already have one other use for this: "C-x =", which > attempts to report the column of the character, something that is very > slow in a long-and-truncated line. And I think we will see more cases > where Lisp code needs to know about this in order to adapt itself to > long lines. Actually, I might have one more idea that could perhaps resolve this more nicely. Gerd, the search for display properties and overlays in forward_to_next_line_start, which disables the 'reseat' shortcut, is because these could have strings as values, and those strings could have embedded newlines, right? Or are there some other reasons?