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 18:40:26 +0000 Message-ID: <136c4fe0fcdf00ef9a11@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> <136c4fe0fc39573addc9@heytings.org> <83k07x8738.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="27378"; 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 20:41:49 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 1oH8SC-0006w9-Dc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 20:41:48 +0200 Original-Received: from localhost ([::1]:56856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oH8SB-0002Ic-DL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 14:41:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oH8RS-0001Qm-6q for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 14:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oH8RR-0002QB-SC for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 14:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oH8RR-0006Zu-Kk for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2022 14:41:01 -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 18:41:01 +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.165903363225219 (code B ref 56682); Thu, 28 Jul 2022 18:41:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 28 Jul 2022 18:40:32 +0000 Original-Received: from localhost ([127.0.0.1]:59397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oH8Qx-0006Yh-Mq for submit@debbugs.gnu.org; Thu, 28 Jul 2022 14:40:32 -0400 Original-Received: from heytings.org ([95.142.160.155]:56608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oH8Qt-0006YT-VZ for 56682@debbugs.gnu.org; Thu, 28 Jul 2022 14:40:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659033626; bh=Qy6j2hxg5emPK4KxbVasR/5C8NoJB7+elG1gepirbbg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=s1/psZLVR86y04PfqIsFV9HRMPcAhub6n0itpfidMG6Yggx7GXRj+Tbl2hfI7qEVn mzVKRgyAGf1SN4Gz4QTTtxRdDNBPs6esRGfsup2SGs/SZXQ6kFfk9Lu6DqOumLU2S6 N+1EdvdHlTtVTNVhL+biovNF+w0KRaKpnAQxVXmjD6iYaf7Kd55ZUqqM8FCW6Df/6A I2jR5TUhrMyan1rqe03k0y2DeGhsAjC9YJwniqf3b6X9Tte3k++xphUgKCIGPQ+AWz jrdB3oSAC2N2Vn3vmwGa6VulQ8/SQVZyibakOMd7y2gQZXxrkysqZ1Ype4JaidA75f y5J2QXZQtF2ww== In-Reply-To: <83k07x8738.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:238129 Archived-At: >> And it is the fundamental problem, because it means that all display >> routines have to deal with a very large amount of data. > > By multiplying a very long and truncated line enough times you can > always make Emacs useless. The speedups I have in mind scale linearly > with the number of such lines, so eventually, with enough such lines, > Emacs will always become very slow at some point, especially if the > window is hscrolled very far to the right. > That's exactly my point: with long and truncated lines Emacs can become unusable with a 20 MB file, with long lines Emacs does not become unusable even with a 1 GB file. And what I (and everybody I guess) wants is a "full and complete" solution. >> 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. > > That's unrelated. The branch was created for your work on font-lock, > and if you are done with that, feel free to land it on master. I can > continue working on master, and/or will create a feature branch if I > feel it's justified. > It's not unrelated, at least not in my mind. The branch was initially created to fix the remaining font-lock related issues, but this thread discusses, and the branch contains, fixes to the other remaining issues. I don't want to close this bug without a "full and complete" solution, and currently someone who has (setq truncate-lines t) in their init file or who presses C-x x t will see Emacs become unusable with a file with long lines. What about the following course of action: I add a "disable truncate-lines in buffers with long lines" feature, and you remove it/disable it/make it optional later if/when you consider that your fixes make Emacs fast enough with long-and-truncated lines. And we can/should open a new bug report and branch to discuss these long-and-truncated lines issues and solution attempts.