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#62352: Very slow scroll-down-line with a lot of text properties Date: Tue, 21 Mar 2023 22:26:01 +0200 Message-ID: <83355x7sx2.fsf@gnu.org> References: <51545b85-029c-a6ff-f733-e486f261f6c0@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17911"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62352@debbugs.gnu.org To: "Herman, Geza" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 21 21:26:23 2023 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 1peiYo-0004PG-In for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Mar 2023 21:26:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peiYW-0001Nk-7D; Tue, 21 Mar 2023 16:26:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peiYU-0001Na-Ey for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 16:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peiYU-00083O-71 for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 16:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peiYU-0007BZ-2y for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 16:26: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: Tue, 21 Mar 2023 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62352 X-GNU-PR-Package: emacs Original-Received: via spool by 62352-submit@debbugs.gnu.org id=B62352.167943035627610 (code B ref 62352); Tue, 21 Mar 2023 20:26:02 +0000 Original-Received: (at 62352) by debbugs.gnu.org; 21 Mar 2023 20:25:56 +0000 Original-Received: from localhost ([127.0.0.1]:60919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peiYO-0007BG-G3 for submit@debbugs.gnu.org; Tue, 21 Mar 2023 16:25:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peiYN-0007B3-3I for 62352@debbugs.gnu.org; Tue, 21 Mar 2023 16:25:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peiYH-0007rz-PA; Tue, 21 Mar 2023 16:25:49 -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=nYxMaNe4p8IQhHGzmC29PVEURKnC5skS3lSPp+Quy9o=; b=SOwblzS0zZ+q IloVX6ON8QGbKBUktlRu/UN8lrg6DfKXJmqi/aJ/we6AuSMhoK/aGEpV+fUin32q/KmZcR0TJgUg4 xn1awrWd5lWcBvCHlma787mLcsHmQYFRbwWdtSG/Zppyitlqmx7eRPZ460aAsIumh5eQ2BJw/azBA usbdR0oqtxU6vy5Ig5klYUBsTcRFdoaTcqLY4oS1Ty4JZ4wKpmVfm4eADMhPjGowK1/vb5Nkosggg XgOYhSRJj2ezml/NuckUs18lEPhOgKASIEV4rywMEd4h9jkQbaz9fkC4p7NOqp6Op5z72KUwC6QKv d4xJu6ionkTJRhBzpr701Q==; Original-Received: from [87.69.77.57] (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 1peiYH-0001Hd-76; Tue, 21 Mar 2023 16:25:49 -0400 In-Reply-To: <51545b85-029c-a6ff-f733-e486f261f6c0@gmail.com> (geza.herman@gmail.com) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258366 Archived-At: > Date: Tue, 21 Mar 2023 21:01:58 +0100 > From: "Herman, Geza" > > Emacs can freeze for seconds when scroll-down-line is called multiple > times if the buffer contains a lot of text properties. Not any text properties: 'face' text properties. Right? > To reproduce the issue without lsp-mode, execute this elisp command with > M-:, this will add a face to operators: > > (font-lock-add-keywords 'c++-mode '(("[][~!^&\|<>:=,.\\+*/%-]" 0 'error))) > > Also, bind scroll-down-line to a key, like shift-up: > > (global-set-key (kbd "") 'scroll-down-line) > > Then, put the attached example.cpp into a c++ buffer, move the point to > the bottom, then press and hold shift-up. Emacs will update the window > for several scroll events, but after that it won't update the screen for > a while. Even after shift-up is released, Emacs needs several seconds to > be interactive again. In general, any change in faces causes the display iterator to stop and load the new face, before it continues. They also cause drawing on the screen to be in smaller chunks, since each stretch of characters in the same face is drawn together. And this example basically changes to a new face every character. So this is expected to display slower than usual. However, are you saying that this is slower in Emacs 29 than it was in Emacs 28? If so, bisection will be appreciated.