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: Tue, 07 Dec 2021 14:58:08 +0200 Message-ID: <83pmq8zi5b.fsf@gnu.org> References: <83sfv74hpm.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52298@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 07 13:59:23 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 1mua42-0001mL-FM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 13:59:22 +0100 Original-Received: from localhost ([::1]:36516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mua40-0000xD-JS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 07:59:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mua3i-0000wx-Tl for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 07:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53260) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mua3i-0004OZ-LI for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 07:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mua3i-0004SB-Gs for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 07:59: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: Tue, 07 Dec 2021 12:59: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.163888189617058 (code B ref 52298); Tue, 07 Dec 2021 12:59:02 +0000 Original-Received: (at 52298) by debbugs.gnu.org; 7 Dec 2021 12:58:16 +0000 Original-Received: from localhost ([127.0.0.1]:36573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mua2y-0004R4-01 for submit@debbugs.gnu.org; Tue, 07 Dec 2021 07:58:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mua2w-0004Qr-LE for 52298@debbugs.gnu.org; Tue, 07 Dec 2021 07:58:15 -0500 Original-Received: from [2001:470:142:3::e] (port=38316 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 1mua2q-0004Hn-Vv; Tue, 07 Dec 2021 07:58:08 -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=7EEj0FADw3J8ea1J+iLiuIChqypW5YnXYqAAh5k7NlU=; b=rVASVVB1hkPC Ehy8kzrllcLjgNQGJpPvTA7XHhy+7hGwV5bc7RQxtp4CiDrjTv1Hl+gQsyaGoLIpz/P/jrannUSxs /AUc7U7aTwV+696vTyMzKPkEdBt+MRiDAMAQe7/5sfil+H1Tp51FPG9mTRcdXTTo/5SDiefL7vzaM haVcCd9BeoWfTHPvIff800HEL8Mml2loBP+iQp6gYTZcFb2JEMHD+im0hZjeECLnE3lBUyYxPldLF UJylyFPhYmkZv3P7LdkLtK2Ff6GwFsIWHygBPGGLSL5+GChFkHGaBjAAf7cPyPhRwNDo7A5eAz1Yz bCCq9OY2A3YC9092kQr5XA==; Original-Received: from [87.69.77.57] (port=3223 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 1mua2q-0004ZL-JD; Tue, 07 Dec 2021 07:58:08 -0500 In-Reply-To: (message from Alan Mackenzie on Mon, 6 Dec 2021 20:53:15 +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:221832 Archived-At: > Date: Mon, 6 Dec 2021 20:53:15 +0000 > Cc: bug-gnu-emacs@gnu.org > From: Alan Mackenzie > > > This is no longer the case in Emacs 29. There, if you visit a C file, > > you will see a flurry of stderr messages about constant redisplay > > cycles being forced. It seems like the culprit is the function > > 'c-type-finder-timer-func', which is run from a timer at 10 Hz (!), > > That is customisable with c-type-finder-repeat-time. The idea is to > have this as often as possible so that the backgroud scanning is > complete as soon as possible. (See my next paragraph.) Yes, but why would I need to do one more chore to get me a "silent" redisplay? And why does this timer cause such a serious work to the display engine? > If this processing continues beyond the time to scan all CC Mode > buffers, then there is a bug. A megabyte long file (xdisp.c) scans in > aroung 18 seconds on my machine. 18 seconds is almost an eternity for my frequent use cases of firing up Emacs to debug some display problem. And it's much more than 18 sec here: I measured 4 minutes and 21 sec, with 1:54 CPU time. My build is unoptimized, but still, a factor of 13 wrt your timing is too much to be explained by that alone. > It can be disabled by setting (or customising) c-type-finder-time-slot > to nil. As I say, the activity should cease after a few seconds, or a > few minutes with a well filled desktop. Once again, it takes much more here. And my main question was left unanswered: what does this timer function do to cause such thorough redisplay cycles, when I know that nothing was changed in the buffer? can you please describe what this function does that could have such an effect?