From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time Date: Wed, 22 Apr 2015 19:32:04 +0000 Message-ID: <20150422193204.GC4120@acm.fritz.box> References: <87a8y0iji1.fsf@gnu.org> <20150422163110.68601.qmail@mail.muc.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429731204 16568 80.91.229.3 (22 Apr 2015 19:33:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2015 19:33:24 +0000 (UTC) Cc: 20404@debbugs.gnu.org, Tassilo Horn To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 22 21:33:14 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 1Yl0OX-00064L-K8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Apr 2015 21:33:13 +0200 Original-Received: from localhost ([::1]:36768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yl0OX-0008AR-3r for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Apr 2015 15:33:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yl0OS-00087o-9p for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 15:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yl0ON-0006Hd-3K for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 15:33:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yl0ON-0006HW-0r for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 15:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yl0OM-0001RO-Cf for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2015 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Apr 2015 19:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20404-submit@debbugs.gnu.org id=B20404.14297311265477 (code B ref 20404); Wed, 22 Apr 2015 19:33:02 +0000 Original-Received: (at 20404) by debbugs.gnu.org; 22 Apr 2015 19:32:06 +0000 Original-Received: from localhost ([127.0.0.1]:36797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yl0NS-0001QH-2M for submit@debbugs.gnu.org; Wed, 22 Apr 2015 15:32:06 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43201 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yl0NO-0001Pa-PG for 20404@debbugs.gnu.org; Wed, 22 Apr 2015 15:32:04 -0400 Original-Received: (qmail 16181 invoked by uid 3782); 22 Apr 2015 19:32:00 -0000 Original-Received: from acm.muc.de (p548A4565.dip0.t-ipconnect.de [84.138.69.101]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 22 Apr 2015 21:32:00 +0200 Original-Received: (qmail 6664 invoked by uid 1000); 22 Apr 2015 19:32:04 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:101885 Archived-At: Hello, Stefan. On Wed, Apr 22, 2015 at 01:37:13PM -0400, Stefan Monnier wrote: > [ OFFTOPIC: the bug report is not about performance but about > a functional bug in jit-lock-defer. ] > > There's a solution (or, depending on your point of view, a workaround) > > for this. You're using Emacs-25, so set fast-but-imprecise-scrolling to > > t, or customize it (it's in customisation group "scrolling"). > FWIW, on my machine, this doesn't make much difference: a single > "font-lock one screen's worth" takes much too long, so after that one > screen is displayed, Emacs takes a while catching up (with no display at > all in the mean time). How long is "too long"? Do you mean that, with fast-but-imprecise-scrolling non-nil, jit-lock-defer-time nil, holding down C-v, that there is no redisplay for several seconds? That would be suggesting that the time to scroll one screen (without fontification) is longer than your auto-repeat interval, which sounds implausible. > That's why after you installed your change, I installed the one I had > suggested (which tweaks the decision about when to skip redisplay and > when to defer font-lock and relies on using jit-lock-defer-time). > In my tests, it worked significantly better (was able to keep up). > So I recommend you try jit-lock-defer-time set to 0 instead of using > fast-but-imprecise-scrolling, and see if you like the > resulting behavior. No, I don't. ;-) What I see is somewhat jerky scrolling, mainly unfontified, but with some fontification flashing on each screen some short time (?10-100 milliseconds) before the next scroll. What I see with fast-but-imprecise-scrolling is somewhat jerky scrolling, but each displayed screen being fully fontified. The delay between drawing the screens is never more than about half a second, mostly less than that, and the delay between releasing C-v and the screen stabilising is likewise no more than half a second. Also, when I attempt to disable jit-lock-defer-time (through the customisation interface) the jit-lock-defer-timer keeps running, and the "defer" mechanism keeps running with it. This seems worth a bug report in its own right. > IIUC if Emacs can *almost* keep up, then fast-but-imprecise-scrolling > might be just enough to let it keep up, in which case the behavior may > look be better than with jit-lock-defer-time (because the text is never > displayed unfontified). But if the repeat rate is faster than that, then > jit-lock-defer-time should give noticeably better results. I don't understand how what you're seeing is so bad. I thought you had a powerful workstation, a class above a typical PC, and that you had your auto-repeat rate at a conservative figure (25 or 30 per second) rather than the insane rate (~40 per second) I have. I have a 5 year old machine, not a blazingly fast super-modern one, and my window is 64 lines deep. fast-but-imprecise-scrolling doesn't require Emacs almost to keep up. It merely prevents a redisplay being directly triggered by the auto-repeated scrolling, instead allowing a redisplay only when there is no input waiting. On my machine, the scrolling easily keeps up with the ~25ms auto-repeat time. > Stefan -- Alan Mackenzie (Nuremberg, Germany).