GNU bug report logs - #12937
24.2; Fontification performed in 'jit-lock-defer-time' in any case (don't wait while Emacs become really idle).

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Oleksandr Gavenko <gavenkoa@HIDDEN>; dated Mon, 19 Nov 2012 20:58:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 12937 <at> debbugs.gnu.org:


Received: (at 12937) by debbugs.gnu.org; 20 Nov 2012 04:01:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 23:01:43 2012
Received: from localhost ([127.0.0.1]:56067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Taf1r-0003Yn-7z
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 23:01:43 -0500
Received: from mtaout20.012.net.il ([80.179.55.166]:56280)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1Taf1p-0003Yg-AG
	for 12937 <at> debbugs.gnu.org; Mon, 19 Nov 2012 23:01:41 -0500
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0MDR00L00PSR2700@HIDDEN> for
	12937 <at> debbugs.gnu.org; Tue, 20 Nov 2012 06:00:33 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MDR00KC2PSXE1D0@HIDDEN>;
	Tue, 20 Nov 2012 06:00:33 +0200 (IST)
Date: Tue, 20 Nov 2012 06:00:12 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#12937: 24.2;
	Fontification performed in 'jit-lock-defer-time' in any case
	(don't	wait while Emacs become really idle).
In-reply-to: <87obitia6d.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Oleksandr Gavenko <gavenkoa@HIDDEN>
Message-id: <83y5hwx6sz.fsf@HIDDEN>
References: <87obitia6d.fsf@HIDDEN>
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview: > From: Oleksandr Gavenko <gavenkoa@HIDDEN> > Date:
	Mon, 
	19 Nov 2012 22:56:26 +0200 > > I open (a very long .c file): > >
	emacs-bzr/trunk/src/coding.c
	> > and hold DOWN key. Text in buffer scrolls up but with jerks (random
	stops
	of > scrolling for a little time) due to fontification actions. > >
	>From
	'jit-lock-defer-time' docs: > > Idle time after which deferred
	fontification should take place. > If nil,
	fontification is not deferred. > > 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)
	>
	> When I hold DOWN key text scrolls up with jerks again! Because
	fontification
	> performed again. > > I expect that when I *hold* key Emacs in not
	idle (it get user input and > redisplay text!!) [...] 
	Content analysis details:   (1.5 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [80.179.55.166 listed in list.dnswl.org]
	0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
X-Debbugs-Envelope-To: 12937
Cc: 12937 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > From: Oleksandr Gavenko <gavenkoa@HIDDEN> > Date: Mon,
    19 Nov 2012 22:56:26 +0200 > > I open (a very long .c file): > > emacs-bzr/trunk/src/coding.c
    > > and hold DOWN key. Text in buffer scrolls up but with jerks (random stops
    of > scrolling for a little time) due to fontification actions. > > >From
    'jit-lock-defer-time' docs: > > Idle time after which deferred fontification
    should take place. > If nil, fontification is not deferred. > > 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) >
    > When I hold DOWN key text scrolls up with jerks again! Because fontification
    > performed again. > > I expect that when I *hold* key Emacs in not idle
   (it get user input and > redisplay text!!) [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [80.179.55.166 listed in list.dnswl.org]
  0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]

> From: Oleksandr Gavenko <gavenkoa@HIDDEN>
> Date: Mon, 19 Nov 2012 22:56:26 +0200
> 
> I open (a very long .c file):
> 
>   emacs-bzr/trunk/src/coding.c
> 
> and hold DOWN key. Text in buffer scrolls up but with jerks (random stops of
> scrolling for a little time) due to fontification actions.
> 
> >From 'jit-lock-defer-time' docs:
> 
>   Idle time after which deferred fontification should take place.
>   If nil, fontification is not deferred.
> 
> 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)
> 
> When I hold DOWN key text scrolls up with jerks again! Because fontification
> performed again.
> 
> I expect that when I *hold* key Emacs in not idle (it get user input and
> redisplay text!!)

It depends on the auto-repeat rate of your keyboard and the speed of
your CPU.  With some combinations of those, I won't be surprised to
learn that Emacs has some idle time between auto-repeated keystrokes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12937; Package emacs. Full text available.

Message received at 12937 <at> debbugs.gnu.org:


Received: (at 12937) by debbugs.gnu.org; 19 Nov 2012 21:30:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 16:30:23 2012
Received: from localhost ([127.0.0.1]:55661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TaYv9-0002Nz-7U
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 16:30:23 -0500
Received: from relais.videotron.ca ([24.201.245.36]:53316)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TaYv6-0002Nr-W4
	for 12937 <at> debbugs.gnu.org; Mon, 19 Nov 2012 16:30:21 -0500
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
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@HIDDEN> for
	12937 <at> debbugs.gnu.org; Mon, 19 Nov 2012 16:29:03 -0500 (EST)
Received: by ceviche.home (Postfix, from userid 20848)	id 31009660FF; Mon,
	19 Nov 2012 16:29:02 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Oleksandr Gavenko <gavenkoa@HIDDEN>
Subject: Re: bug#12937: 24.2; Fontification performed in 'jit-lock-defer-time'
	in any case (don't wait while Emacs become really idle).
Message-id: <jwvsj85xpas.fsf-monnier+emacs@HIDDEN>
References: <87obitia6d.fsf@HIDDEN>
Date: Mon, 19 Nov 2012 16:29:02 -0500
In-reply-to: <87obitia6d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview: > 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 [...] 
	Content analysis details:   (1.5 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [24.201.245.36 listed in list.dnswl.org]
	0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
	0.0 T_HDRS_LCASE           Odd capitalization of message header
	0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers
X-Debbugs-Envelope-To: 12937
Cc: 12937 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > 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 [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [24.201.245.36 listed in list.dnswl.org]
  0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]

> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12937; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Nov 2012 20:57:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 19 15:57:44 2012
Received: from localhost ([127.0.0.1]:55612 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TaYPY-0001cJ-3v
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:57:44 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33260)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYPV-0001cC-LA
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:57:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYOP-0006T6-AB
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:56:36 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:36179)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYOP-0006T0-6i
	for submit <at> debbugs.gnu.org; Mon, 19 Nov 2012 15:56:33 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44222)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYOO-0006jq-7h
	for bug-gnu-emacs@HIDDEN; Mon, 19 Nov 2012 15:56:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYON-0006SU-4L
	for bug-gnu-emacs@HIDDEN; Mon, 19 Nov 2012 15:56:32 -0500
Received: from mail-ee0-f41.google.com ([74.125.83.41]:64997)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gavenkoa@HIDDEN>) id 1TaYOM-0006SK-U7
	for bug-gnu-emacs@HIDDEN; Mon, 19 Nov 2012 15:56:31 -0500
Received: by mail-ee0-f41.google.com with SMTP id d41so3631574eek.0
	for <bug-gnu-emacs@HIDDEN>; Mon, 19 Nov 2012 12:56:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:date:message-id:mime-version:content-type;
	bh=xIxaDfDWlFBCmagdjS/cFQldvNGT4Bske546gO1CbZE=;
	b=aA/yxM+9h1GKRr6PuTtSDUsRlxjz3e6lsWq+RTZbKQDNjOZamJ75GsUgQUtdhvoYZL
	3dOO1sDBG88SS/EqN30q+fPJ15pUVzDQ4OI4TjTk+kJi8CCQL2sajxsfypXKvrdVD+Is
	AxQeZehDOSQdMtU1AxqiRWBIq504Fh44wYWVIEBRrJuTXvUwLfA1yhqkD+jhlk2q9/Qo
	9KKn7mdao4f2pLoNOSA+0V+THe2uOemnsX7qKv63e6iU/I3izOhIVsSXG80P/UKftOQC
	GpWSXoxJs7C8kRra0ppHaeDv5sHlV0Sl21B3s0o+LJ1SqPa29NN9J1X9cgnrbNuHvrOV
	4y0w==
Received: by 10.14.199.134 with SMTP id x6mr27564618een.31.1353358590065;
	Mon, 19 Nov 2012 12:56:30 -0800 (PST)
Received: from desktop ([37.229.16.202])
	by mx.google.com with ESMTPS id g47sm26312200eeo.6.2012.11.19.12.56.27
	(version=SSLv3 cipher=OTHER); Mon, 19 Nov 2012 12:56:28 -0800 (PST)
From: Oleksandr Gavenko <gavenkoa@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 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 22:56:26 +0200
Message-ID: <87obitia6d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

I open (a very long .c file):

  emacs-bzr/trunk/src/coding.c

and hold DOWN key. Text in buffer scrolls up but with jerks (random stops of
scrolling for a little time) due to fontification actions.

From 'jit-lock-defer-time' docs:

  Idle time after which deferred fontification should take place.
  If nil, fontification is not deferred.

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)

When I hold DOWN key text scrolls up with jerks again! Because fontification
performed again.

I expect that when I *hold* key Emacs in not idle (it get user input and
redisplay text!!) so don't understand why fontification take place. May be I
misunderstand idling concept in Emacs and should read manuals deeper...

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.

So it is good to have 'jit-lock-defer-time' behaviour that allow trick with
defer fontification.

I know some peoples use workflow when they use scroll-bars for very fast
moving around a file (to get brief look of file content). I prefer use
PageUp/PageDown keys to perform this task.

In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-09 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000

-- 
Best regards!




Acknowledgement sent to Oleksandr Gavenko <gavenkoa@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#12937; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.