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#56393: Actually fix the long lines display bug Date: Sat, 09 Jul 2022 14:16:10 +0300 Message-ID: <83czee35ad.fsf@gnu.org> References: <38c1a31040d2d2bc47ae@heytings.org> <38c1a310405bd4bbe370@heytings.org> <87a69n98yy.fsf@yahoo.com> <38c1a31040f5546dbd3a@heytings.org> <87czej6buq.fsf@gnus.org> <38c1a31040e66d2b273e@heytings.org> <834jzt59jt.fsf@gnu.org> <831qux5806.fsf@gnu.org> <9C70BEF7-08EC-46A0-89D3-547417FA01F8@gmail.com> <83let43xg9.fsf@gnu.org> <83sfna3gzq.fsf@gnu.org> <83o7xy3amx.fsf@gnu.org> <83ilo638qt.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5836"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, larsi@gnus.org, 56393@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 09 13:17:12 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 1oA8SV-0001B1-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 13:17:11 +0200 Original-Received: from localhost ([::1]:58086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oA8SU-00042Q-5U for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 07:17:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oA8SM-000415-N5 for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 07:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oA8SM-00044b-EQ for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 07:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oA8SM-0002Ix-6f for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 07:17: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: Sat, 09 Jul 2022 11:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56393 X-GNU-PR-Package: emacs Original-Received: via spool by 56393-submit@debbugs.gnu.org id=B56393.16573653898807 (code B ref 56393); Sat, 09 Jul 2022 11:17:02 +0000 Original-Received: (at 56393) by debbugs.gnu.org; 9 Jul 2022 11:16:29 +0000 Original-Received: from localhost ([127.0.0.1]:33930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oA8Rp-0002Hz-Aj for submit@debbugs.gnu.org; Sat, 09 Jul 2022 07:16:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oA8Rn-0002Hk-0d for 56393@debbugs.gnu.org; Sat, 09 Jul 2022 07:16:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oA8Rh-00041K-HC; Sat, 09 Jul 2022 07:16: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=t2GZGLXGSWGbcvAKGIF6dPc51oL/TEtEZEub1cqusEg=; b=EYocqZx04fbH NDOZfeje9xHSevX5axRX8xrepEHnAdBMrzHv43mWQ3m35jOoKAfyVVtjAS5bqm5wfg4M8OGosZf0B OphSIcOBLpjGaH47HFZWX0Z5Lm00s+a4f2HA0wlKAMw3mpNDeplrE+mVMHmnlR+CzAUD0yKicB56C sCfBvr42SCoWX/nR0WsURWwclchXnnS0PoYv0y9talr4IiBpe9EVanF/+UnPUnLmZhR9SC3oKWsyS s+UwoDS91eSqPq4K9Qny1eGglqGkdl7Hkby3A/RTfigVToxjk0CM2QdN2BsrSWo0FWlC6BIlSWWwN mmeqSDidfx2mbNcrhGkSOg==; Original-Received: from [87.69.77.57] (port=1600 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 1oA8Rd-00068v-W0; Sat, 09 Jul 2022 07:16:21 -0400 In-Reply-To: (message from Gregory Heytings on Sat, 09 Jul 2022 10:50:26 +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:236503 Archived-At: > Date: Sat, 09 Jul 2022 10:50:26 +0000 > From: Gregory Heytings > cc: gerd.moellmann@gmail.com, larsi@gnus.org, 56393@debbugs.gnu.org > > > I'm asking whether applying the "restriction" where we call > > Vfontification_functions from the display engine won't also solve 3. > > > > It doesn't, see again the long-line-excerpt.xml file I sent you. It is > only 30K long, which would be a typical size for a restriction, and > editing that file is slow when font locking is on and fast when font > locking is off. I guess it's because we leave ZV at its original value, and font-lock attempts to fontify the entire long line till the end? Does it help to make the value of syntax-wholeline-max smaller? > What I would do (but I'm pretty sure you wouln't agree with that) is to > measure the time taken by fontification-functions in > handle_fontified_prop, and whenever that time is above a certain threshold > (say 0.25 or 0.5 seconds), to set fontification-functions to nil in that > buffer. You could instead look at the value of the "redisplay tick count" collected by update_redisplay_ticks. (That is only called if max-redisplay-ticks is non-zero, but you could set it to some large value, so that it never actually signals an error.) > But fontification-functions are not the only problem here. What I also > observe is that, for example, moving in a fontified buffer takes (much) > longer than moving in a non-fontified buffer. For example, in > long-line.xml, vertical-motion takes about 40 ms backward and 10 ms > forward in a non-fontified buffer, and about 180 ms backward and 40 ms > forward in a fontified buffer. I guess that's because vertical-motion calls the display code, and that calls fontification-functions.