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#52298: 29.0.50; Frequent redisplay cycles induced by c-type-finder-timer-func timer in CC Mode Date: Fri, 10 Dec 2021 20:51:32 +0200 Message-ID: <838rwss37v.fsf@gnu.org> References: <83sfv74hpm.fsf@gnu.org> <83wnkeuufz.fsf@gnu.org> <838rwttsxj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8715"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 52298@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 10 19:52:11 2021 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 1mvl06-0001yR-Ng for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 19:52:10 +0100 Original-Received: from localhost ([::1]:59758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvl04-0004Y4-Qm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 13:52:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvkzy-0004Xv-Gy for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 13:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvkzy-0006rO-8X for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 13:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvkzy-0000U6-2g for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 13:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Dec 2021 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52298 X-GNU-PR-Package: emacs Original-Received: via spool by 52298-submit@debbugs.gnu.org id=B52298.16391623171852 (code B ref 52298); Fri, 10 Dec 2021 18:52:02 +0000 Original-Received: (at 52298) by debbugs.gnu.org; 10 Dec 2021 18:51:57 +0000 Original-Received: from localhost ([127.0.0.1]:47904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvkzt-0000To-Ah for submit@debbugs.gnu.org; Fri, 10 Dec 2021 13:51:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvkzp-0000TX-Jo for 52298@debbugs.gnu.org; Fri, 10 Dec 2021 13:51:55 -0500 Original-Received: from [2001:470:142:3::e] (port=43546 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvkzi-0006oJ-Ts; Fri, 10 Dec 2021 13:51:46 -0500 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=RCz00MxglATJhWjTd6sF0I8NJFzEgs1M8fp0Lefyw+o=; b=fNve3dkES1Ia Mgsp/Y1QM/u0neuGSO3TzChfwDSUtAMfJJ5+u/UxI29oSVaVel45IHvp1+1gNJMXAC5nx8zOvfknQ KGP+DHZgHEM+BDyV2ayI0U0KMhk896t7nqicAhnwJ4WnQL+r52CEcQ33y4cRJ8lTXG2L0JC9m9292 SBtlZ8bF9pGWtPMxjFfC/i28BzqGpRi6DoHSQO4SmQmdf0hj1pJfnGdDlAGFLt6k073Lgh5VsUPYN i1qO1BUwxptjW1qChCByEdyV8St2STVipaVtOY3EZ2xb1S4ZEOxQq0KZQ3HXbttx5rbNnTq2NEle8 qfK89cVlxYSsU1+ItAkFdg==; Original-Received: from [87.69.77.57] (port=4806 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 1mvkzh-0001R2-OX; Fri, 10 Dec 2021 13:51:46 -0500 In-Reply-To: (message from Alan Mackenzie on Fri, 10 Dec 2021 18:16:21 +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:222082 Archived-At: > Date: Fri, 10 Dec 2021 18:16:21 +0000 > Cc: 52298@debbugs.gnu.org, acm@muc.de > From: Alan Mackenzie > > > Both of these are called from the timer function. Are they using > > with-silent-modifications? > > I'm pretty sure they are. > > I think that modify_text_properties is calling modiff_incr even when > inhibit_modification_hooks is non-nil. I tried putting an `if' around > that bit of the code, without any great success. AFAIK, with-silent-modifications is supposed to prevent BUF_MODIFF from increasing. Are you sure you see that? And what kind of 'if' did you try to put and where? > The main reason for all the redisplaying (which I got from > trace-redisplay displaying "redisplay_preserve_echo_area (8)") is the > call from detect_input_pending_run_timers in keyboard.c. It is calling > redisplay_preserve_echo_area each time the timer triggers. This is normal, not something you need to investigate: every time a timer function fires, we make one more iteration through the Emacs idle loop, and that includes a call to redisplay_preserve_echo_area. Once again, the problem is not that redisplay is invoked, the problem is that it doesn't exit almost immediately, after detecting that nothing's changed.