From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#20285: 25.0.50; blink-cursor-mode sometimes stops blinking Date: Sat, 11 Apr 2015 07:54:52 +0200 Message-ID: <87r3rrxl8z.fsf@gnu.org> References: <8761954apb.fsf@gnu.org> <831tjtfijq.fsf@gnu.org> <83zj6he14h.fsf@gnu.org> <87wq1kmnmh.fsf@gnu.org> <83d23cv2hj.fsf@gnu.org> <87sic8miwb.fsf@gnu.org> <83h9sotasm.fsf@gnu.org> <877ftkm8he.fsf@gnu.org> <83a8ygt8g5.fsf@gnu.org> <87y4m0kr53.fsf@gnu.org> <878udzentr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428731722 12350 80.91.229.3 (11 Apr 2015 05:55:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Apr 2015 05:55:22 +0000 (UTC) Cc: 20285@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 11 07:55:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YgoNp-0002XB-Hc for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Apr 2015 07:55:09 +0200 Original-Received: from localhost ([::1]:41923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgoNo-0007ME-Qc for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Apr 2015 01:55:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgoNk-0007M8-VO for bug-gnu-emacs@gnu.org; Sat, 11 Apr 2015 01:55:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgoNj-0005v6-FC for bug-gnu-emacs@gnu.org; Sat, 11 Apr 2015 01:55:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgoNj-0005uY-B4 for bug-gnu-emacs@gnu.org; Sat, 11 Apr 2015 01:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YgoNi-0001k9-Ka for bug-gnu-emacs@gnu.org; Sat, 11 Apr 2015 01:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Apr 2015 05:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20285 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20285-submit@debbugs.gnu.org id=B20285.14287317006691 (code B ref 20285); Sat, 11 Apr 2015 05:55:02 +0000 Original-Received: (at 20285) by debbugs.gnu.org; 11 Apr 2015 05:55:00 +0000 Original-Received: from localhost ([127.0.0.1]:52792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgoNf-0001jq-U6 for submit@debbugs.gnu.org; Sat, 11 Apr 2015 01:55:00 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54250) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgoNc-0001jf-Bk for 20285@debbugs.gnu.org; Sat, 11 Apr 2015 01:54:57 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A817A20556 for <20285@debbugs.gnu.org>; Sat, 11 Apr 2015 01:54:51 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 11 Apr 2015 01:54:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=+5eFOqS9VCVDeVZttMMbpPxBmIk=; b=TRo4v KPpbuey6i8W2v3OKDvvpKCt8kmtLEO4nq6mdysg3+IE5zalq7EFK+89B3c2tzKpV uiUiKgd7QsX3vjP4bXsBfSRxclsy1WwKo/i2r/ZQLmFH2b1lFYMdqrDVhZsNdvjX uSFdoEgy440+hNLwipdWUOpGBrm9/0H6HXIyWc= X-Sasl-enc: TcNYZeLFB9McJvjayJ44+yGbV4BdeiOzzGzXlKVl/bLT 1428731695 Original-Received: from thinkpad-t440p (unknown [2.161.103.173]) by mail.messagingengine.com (Postfix) with ESMTPA id EE4D3C0001C; Sat, 11 Apr 2015 01:54:54 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Fri, 10 Apr 2015 17:50:16 -0400") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101403 Archived-At: Stefan Monnier writes: >> I can at least confirm that `blink-cursor-timer-function' runs every 0.5 >> seconds and toggles the visibility state of the cursor. When that state >> doesn't appear on the screen, then what else can it be except for a >> skipped redisplay. > > Of course, I don't know what it is, but it could be many other things, > such as a successful redisplay which somehow just didn't think the > relevant window needed to be refreshed. > Or a misinterpretation of the state of the cursor? > Or maybe the cursor state is indeed changed, but not in the right window? That happens also when there is just one window (except the minibuffer window). And when there are more, the cursors in the other windows stay hollow boxes. I haven't noticed that one of them disappeared completely yet. >> Maybe the interval is 0.8 seconds sometimes when emacs is under heavy >> load. But the timer not being run is definitely not the cause for not >> blinking for up to 10 seconds here. >>> Have you tried to call `redisplay' explicitly from the blink-cursor >>> timer? >> Yes, then it blinks fine even under stress. > > Great, so that would hint at redisplay being skipped, indeed. > Revision 9e77c1b7bcfd0807be7fe67daf73c2320e864309 changed the way we > decide when to skip a redisplay recently. The change should make us > skip redisplay strictly less often rather than more often, but maybe > there's a problem in that change. > > You could also use a pre-redisplay-function to count how many times > redisplay happensin that particular window. Ok, I used the following code (add-function because there's already a pre-redisplay function which I didn't want to replace): --8<---------------cut here---------------start------------->8--- (defvar th/redisplay-count 0) (defun th/count-redisplays (windows) (when (or (null windows) (eq windows t) (memq (selected-window) windows)) (incf th/redisplay-count))) (add-function :before pre-redisplay-function #'th/count-redisplays) --8<---------------cut here---------------end--------------->8--- Then I switched to some large latex buffer, did M-: (setq th/redisplay-count 0), and then started compiling that document to generate some load. Then I waited for exactly one minute in which there has been at least one phase of almost 10 seconds with the cursor being invisible on the screen before getting the value of th/redisplay-count. And the value is seven hundred something every time I test. That's more than 10 redisplays of the selected window per second! I didn't do anything in that one minute so there shouldn't have been a reason for redisplay to kick in except for the blinking cursor. And that would suggest 120 redisplays. Of course, it's still possible that during the 10 seconds where the cursor was invisible on the screen there hasn't been a redisplay of the selected window, but how can I know? Bye, Tassilo