From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Unfreezing the display during auto-repeated scrolling. Simpler approach. Date: Wed, 29 Oct 2014 12:59:26 -0400 Message-ID: References: <20141026221530.GF4397@acm.acm> <20141027142801.GC2771@acm.acm> <83y4s1317s.fsf@gnu.org> <20141027193839.GD2771@acm.acm> <20141028181003.GA6630@acm.acm> <83wq7j0xqj.fsf@gnu.org> <20141029145211.GB2953@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414602054 2812 80.91.229.3 (29 Oct 2014 17:00:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2014 17:00:54 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 29 18:00:46 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XjWbW-0005uT-VP for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 18:00:15 +0100 Original-Received: from localhost ([::1]:47752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWbW-0006VC-JR for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 13:00:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWb1-0006MX-Se for emacs-devel@gnu.org; Wed, 29 Oct 2014 12:59:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjWau-0001mD-D5 for emacs-devel@gnu.org; Wed, 29 Oct 2014 12:59:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjWal-0001fk-M0; Wed, 29 Oct 2014 12:59:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCw4mEhQYDSSISwnLcgEBAQcCAR+RCAeESwWfEpB9ghGBb4QUIYJ6AQEB X-IPAS-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCw4mEhQYDSSISwnLcgEBAQcCAR+RCAeESwWfEpB9ghGBb4QUIYJ6AQEB X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95520818" Original-Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2014 12:59:26 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 887137ABE; Wed, 29 Oct 2014 12:59:26 -0400 (EDT) In-Reply-To: <20141029145211.GB2953@acm.acm> (Alan Mackenzie's message of "Wed, 29 Oct 2014 14:52:11 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176022 Archived-At: > Just to be absolutely clear, we're talking about my _simpler_ hack, the > one that binds fontification-functions to nil during scrolling. The > previous complicated one, that messed with "struct it"s, I think we can > all agree is dead. Yes. > An approach I haven't tried yet would be to use the existing scrolling > functionality for discreet key presses, changing to > nilled-out-fontification-functions when the keystrokes are coming in at > auto-repeat rates. I think the problem is how to distinguish the two. If we can distinguish the two, then we could probably use it in jit-lock-defer. More specifically, your jit-lock-defer experiment showed that the problem is that to get smooth scrolling, we need to skip fontification during the scroll even though there's no input pending (because the next repetition hasn't arrived yet). Another way to look at it: if running CMD required to run the fontification functions, then we should not skip the subsequent redisplay even if there's input pending (this is based on the assumption that running the fontification functions takes the lion's share of redisplay time and that running the fontification function during CMD means that redisplay probably won't need to run the fontification function). Such a heuristic might make the jit-lock-defer-when-input-pending work better. Stefan