From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Thu, 28 Jul 2022 17:16:32 +0000 Message-ID: <136c4fe0fc39573addc9@heytings.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> <83sfmnb7yg.fsf@gnu.org> <837d3ybh5z.fsf@gnu.org> <136c4fe0fc74196714aa@heytings.org> <83pmhp89ov.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15544"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 28 19:17: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 1oH78l-0003mv-NR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 19:17:39 +0200 Original-Received: from localhost ([::1]:44270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oH78k-0002y7-KM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 13:17:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oH78H-0002wv-2u for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 13:17:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oH78A-0004Ne-9z for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 13:17:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oH78A-0004K1-5s for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2022 17:17: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.165902859616570 (code B ref 56682); Thu, 28 Jul 2022 17:17:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 28 Jul 2022 17:16:36 +0000 Original-Received: from localhost ([127.0.0.1]:59328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oH77j-0004JB-ML for submit@debbugs.gnu.org; Thu, 28 Jul 2022 13:16:35 -0400 Original-Received: from heytings.org ([95.142.160.155]:56522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oH77i-0004J3-42 for 56682@debbugs.gnu.org; Thu, 28 Jul 2022 13:16:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659028593; bh=Qzf4dEWevmUQL1EtB/QLxJyXxm5XNhu3WDE6a2D8oXs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=9Uzq7d43thYawsy1/2Gds08I/or14bqoSNDPis8vhnGUi7q7PeOul9SKLcQq+ciaR 4iClrmNp+KKpFAB+i/PKXnzVum2t84PzJ7W2LUtGakHOBsa+Y+dxkNiQtlxShUsGfR BaBntsvhLLw4xjhObxvrRuwOG7lbLY7vcCJ3LeTAOn48MFY/SxWhO2sQcAl0athkOu QPlU+AwxJOWm6CjhudGM1uvCI6fgaLPbkvgd2syQPPjqPdPH2/0LAH1ugC54zJYDtw KqG6JA5h/8pxSGB2PffMBOtLUvOyENXrkJtLepAHfXDRzLIbsi1lCaePwqGteDuJ/D 2xif2CmGuM6Pg== In-Reply-To: <83pmhp89ov.fsf@gnu.org> 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:238124 Archived-At: > > I think such long lines happen in files that have very little except the > long line. So duplicating it makes the use case much less important. > That's not correct. Some files have indeed have a single long line, but others have more than one long line. Duplicating the line in that file was just a quick way to generate a file with more long lines. For example, a database dump will typically contain one long line for each table. I have a database dump here with ~100 lines that are each about 1 MB long, each of which is a single "insert into" statement. > > This is actually a bug in isearch.el: using window-end in a buffer under > truncate-lines is simply wrong. > The measurements I gave were with isearch, but as I said you see the same kind of slowdowns with motion and insertion commands. > > But that's not a fundamental problem, or at least I don't yet see why it > would be fundamental. It's something specific to isearch.el and to how > isearch-lazy-highlight is implemented. > No, the measurements I gave were with isearch-lazy-highlight turned OFF. And it is the fundamental problem, because it means that all display routines have to deal with a very large amount of data. > > I still have one or two ideas to try, and they don't involve anything as > complex as some new kind of narrowing. > Okay, so I'll wait a bit more. I'd like to reach a conclusion as to whether truncate-lines should be turned off when long_line_optimizations_p is on before merging the branch into master.