all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Regression in 22.2 jit-lock?
@ 2008-03-28 18:06 Ulrich Mueller
  2008-03-28 21:58 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2008-03-28 18:06 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 708 bytes --]

Not sure if the following is a regression, or just an incompatible
change.

When editing some 500 line bash script today, I had the impression
that editing was quite sluggish in 22.2, as compared to 22.1.

I've prepared a minimal example to reproduce the different behaviour:

   1. Open attached file test.sh with "emacs -Q"
   2. Remove one of the double quotes inside function foo()

While in 22.1 fontification of function bar() is delayed by 0.5
seconds, namely the default value of jit-lock-context-time, it is
immediate in 22.2. For large buffers this leads to the sluggish
behaviour mentioned above.

Is it possible that jit-lock-context-time is no longer honoured under
some circumstances?

Ulrich


[-- Attachment #2: test.sh --]
[-- Type: text/plain, Size: 114 bytes --]

#!/bin/bash

foo() {
    echo "it's a test"
}

bar() {
    cat <<-EOF >baz.el
	;;; baz.el
	(require 'quux)
	EOF
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression in 22.2 jit-lock?
  2008-03-28 18:06 Regression in 22.2 jit-lock? Ulrich Mueller
@ 2008-03-28 21:58 ` Chong Yidong
  2008-03-29  4:16   ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2008-03-28 21:58 UTC (permalink / raw)
  To: Stefan Monnier, Ulrich Mueller; +Cc: emacs-devel

Ulrich Mueller <ulm@gentoo.org> writes:

> I've prepared a minimal example to reproduce the different behaviour:
>
>    1. Open attached file test.sh with "emacs -Q"
>    2. Remove one of the double quotes inside function foo()
>
> While in 22.1 fontification of function bar() is delayed by 0.5
> seconds, namely the default value of jit-lock-context-time, it is
> immediate in 22.2.
>
> #!/bin/bash
>
> foo() {
>     echo "it's a test"
> }
>
> bar() {
>     cat <<-EOF >baz.el
> 	;;; baz.el
> 	(require 'quux)
> 	EOF
> }

Thanks for spotting this.  The bug was introduced by the following
change.  Stefan?

2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>

	* progmodes/sh-script.el (sh-font-lock-backslash-quote)
	(sh-font-lock-flush-syntax-ppss-cache): New funs.
	(sh-font-lock-syntactic-keywords): Use them to distinguish the
	different possible cases for \'.
	(sh-font-lock-paren): Mark the relevant text with font-lock-multiline.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression in 22.2 jit-lock?
  2008-03-28 21:58 ` Chong Yidong
@ 2008-03-29  4:16   ` Stefan Monnier
  2008-03-29  7:12     ` Ulrich Mueller
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-03-29  4:16 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Ulrich Mueller, emacs-devel

>> I've prepared a minimal example to reproduce the different behaviour:
>> 
>> 1. Open attached file test.sh with "emacs -Q"
>> 2. Remove one of the double quotes inside function foo()
>> 
>> While in 22.1 fontification of function bar() is delayed by 0.5
>> seconds, namely the default value of jit-lock-context-time, it is
>> immediate in 22.2.
>> 
>> #!/bin/bash
>> 
>> foo() {
>> echo "it's a test"
>> }
>> 
>> bar() {
>> cat <<-EOF >baz.el
>> ;;; baz.el
>> (require 'quux)
>> EOF
>> }

> Thanks for spotting this.  The bug was introduced by the following
> change.  Stefan?

> 2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>

> 	* progmodes/sh-script.el (sh-font-lock-backslash-quote)
> 	(sh-font-lock-flush-syntax-ppss-cache): New funs.
> 	(sh-font-lock-syntactic-keywords): Use them to distinguish the
> 	different possible cases for \'.
> 	(sh-font-lock-paren): Mark the relevant text with font-lock-multiline.

Hmm... so the "relevant text" marked with font-lock-multiline is so
large that it causes sluggishness...  Not sure what to do about it,


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Regression in 22.2 jit-lock?
  2008-03-29  4:16   ` Stefan Monnier
@ 2008-03-29  7:12     ` Ulrich Mueller
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller @ 2008-03-29  7:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel

>>>>> On Sat, 29 Mar 2008, Stefan Monnier wrote:

>> 2007-07-23  Stefan Monnier  <monnier@iro.umontreal.ca>

>> * progmodes/sh-script.el (sh-font-lock-backslash-quote)
>> 	(sh-font-lock-flush-syntax-ppss-cache): New funs.
>> 	(sh-font-lock-syntactic-keywords): Use them to distinguish the
>> 	different possible cases for \'.
>> 	(sh-font-lock-paren): Mark the relevant text with font-lock-multiline.

> Hmm... so the "relevant text" marked with font-lock-multiline is so
> large that it causes sluggishness...  Not sure what to do about it,

Well, the real file is here (too large to attach):
<http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/eclass/elisp-common.eclass?rev=1.37>

Go to line 292 and insert something; it is quite sluggish in 22.2.
(Setting jit-lock-defer-time will help a little, but in 22.1 it was
just fine with the default configuration.)

Ulrich




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-29  7:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 18:06 Regression in 22.2 jit-lock? Ulrich Mueller
2008-03-28 21:58 ` Chong Yidong
2008-03-29  4:16   ` Stefan Monnier
2008-03-29  7:12     ` Ulrich Mueller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.