From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12937: 24.2; Fontification performed in 'jit-lock-defer-time' in any case (don't wait while Emacs become really idle). Date: Mon, 19 Nov 2012 16:29:02 -0500 Message-ID: References: <87obitia6d.fsf@gavenkoa.example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1353360602 11329 80.91.229.3 (19 Nov 2012 21:30:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 21:30:02 +0000 (UTC) Cc: 12937@debbugs.gnu.org To: Oleksandr Gavenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 19 22:30:13 2012 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 1TaYux-00017g-B0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 22:30:11 +0100 Original-Received: from localhost ([::1]:38287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaYun-0007AC-3d for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 16:30:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaYul-0007A0-0q for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 16:29:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaYuj-0000sK-T9 for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 16:29:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaYuj-0000s2-PY for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 16:29:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TaYvm-0002Ou-8G for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 16:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Nov 2012 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12937 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12937-submit@debbugs.gnu.org id=B12937.13533606239178 (code B ref 12937); Mon, 19 Nov 2012 21:31:02 +0000 Original-Received: (at 12937) by debbugs.gnu.org; 19 Nov 2012 21:30:23 +0000 Original-Received: from localhost ([127.0.0.1]:55661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaYv9-0002Nz-7U for submit@debbugs.gnu.org; Mon, 19 Nov 2012 16:30:23 -0500 Original-Received: from relais.videotron.ca ([24.201.245.36]:53316) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaYv6-0002Nr-W4 for 12937@debbugs.gnu.org; Mon, 19 Nov 2012 16:30:21 -0500 Original-Received: from ceviche.home ([24.201.208.110]) by VL-VM-MR001.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MDR0076W7OERPB0@VL-VM-MR001.ip.videotron.ca> for 12937@debbugs.gnu.org; Mon, 19 Nov 2012 16:29:03 -0500 (EST) Original-Received: by ceviche.home (Postfix, from userid 20848) id 31009660FF; Mon, 19 Nov 2012 16:29:02 -0500 (EST) In-reply-to: <87obitia6d.fsf@gavenkoa.example.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:67187 Archived-At: > I would try to workaround jerks with: > (setq jit-lock-defer-time 0.01) > and with same negative effect by (see below): > (setq jit-lock-defer-time 3.0) I don't see that. I'm not sure how you tried, it but I did src/emacs -Q --eval '(setq jit-lock-defer-time 0.01)' src/xdisp.c and scrolling with page-down indeed is jerky and I see that the buffer is getting fontified (at least occasionally). But if I try again with src/emacs -Q --eval '(setq jit-lock-defer-time 0.1)' src/xdisp.c then the scrolling is fast&smooth and it only gets fontified when I stop scrolling. I suspect that fontification takes place in the 0.01s case because redisplay itself takes more than 0.01s, so after redisplay we check timers and see that we've been idle for more than 0.01s (and there's no input yet because my repeat rate is 30Hz). BTW, with 0.01s the behavior is particularly poor because the redisplay is even slower than without it: we first do a redisplay without fontification, and then we fontify and have to redo a redisplay, so the first redisplay is mostly wasted work. > Also note that fixing CC-mode is not a solution as there are many possible > external modes that can be useful but with slow fontification. Fixing cc-mode is not a general solution, indeed, but it should also be done. Stefan