GNU bug report logs - #15755
24.3.50; cperl-mode annoyingly slow on my netbook

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Wed, 30 Oct 2013 13:30:03 UTC

Severity: normal

Found in version 24.3.50

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15755 in the body.
You can then email your comments to 15755 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Wed, 30 Oct 2013 13:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jambunathan K <kjambunathan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 Oct 2013 13:30:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Wed, 30 Oct 2013 18:59:56 +0530
On my netbook (HP Mini 110) cperl-mode responds so slowly that it is
very annoying to type.  

Consider this bug as a counter-point to those who argue for making
cperl-mode the default.

ps: I don't have any cperl-mode specific customizations in my .emacs.


In GNU Emacs 24.3.50.4 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-10-30 on debian-6.05
Bzr revision: 114868 rgm <at> gnu.org-20131030102316-8vif7u6ecyo3yieg
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux 6.0.5 (squeeze)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Wed, 30 Oct 2013 18:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 15755 <at> debbugs.gnu.org
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Wed, 30 Oct 2013 14:13:34 -0400
> On my netbook (HP Mini 110) cperl-mode responds so slowly that it is
> very annoying to type.

Usually, cperl-mode is fast enough (most of my machines are about as
powerful as a typical netbook).  So maybe you're just hitting a bug
(tho, maybe you're hitting a pathological case, as well).

Do you have some test case we can use to reproduce the problem?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Wed, 30 Oct 2013 19:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 15755 <at> debbugs.gnu.org
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 01:13:47 +0530
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> On my netbook (HP Mini 110) cperl-mode responds so slowly that it is
>> very annoying to type.
>
> Usually, cperl-mode is fast enough (most of my machines are about as
> powerful as a typical netbook).  So maybe you're just hitting a bug
> (tho, maybe you're hitting a pathological case, as well).
>
> Do you have some test case we can use to reproduce the problem?

If indeed this is a bug, I would call it a "showstopper" for cperl-mode.

Here is a recipe.  The file used below is the Oddmuse's Wiki engine.

mkdir ~/tmp

cd ~/tmp

wget http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl

emacs -Q

Here is a report from M-x view-lossage RET.  I do this:

1. C-x C-f ~/tmp/wiki.pl
2. M-x cperl-mode
3. C-s ApplyRules {
4. C-a
5. Move the cursor down a few lines
6. C-M-e.  Jump to end of defun. Move up a few lines to seek the comment
   line.
7. Type a few characters

(5) is slow. (7) is very slow.  Meaning it takes ages for the 10 or so
characters to be echoed.

Interestingly, after (2) I see the following message reported by
cperl-mode.  I am not sure whether the error is a cause for slow
performance.

Anyways, if I do,

    perl wiki.pl

I don't see the perl complaining about the file being bad.  So there is
a bug somewhere.

Apart from the recipe above, you can try the following

1. Mark the ApplyRules sub.
2. M-x indent-region it.

With perl-mode, (1) and (2) is very quick.  But with cperl-mode things
are bad.



--8<---------------cut here---------------start------------->8---
End of `qw( ... )' string/RE not found: (scan-error Unbalanced parentheses 1543 155427)
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
[cperl-lossage.txt (text/plain, inline)]
C-x C-f t m p / w i k i . p l <return> <escape> x c
p e r l - m o d e <return> C-s A p p l y R u l e s
SPC { C-a <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> C-M-e
<up> <up> <up> C-e SPC i n s e r t i n g SPC t h i
s SPC t e x t SPC t a k e s SPC a SPC l o t SPC o f
SPC t i m e <escape> x v i e w - l o s s a g e <re
turn>
[Message part 3 (text/plain, inline)]
--8<---------------cut here---------------end--------------->8---



>         Stefan

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 01:25:02 GMT) Full text and rfc822 format available.

Message #14 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 15755 <at> debbugs.gnu.org, Jonathan Rockway <jon <at> jrock.us>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Wed, 30 Oct 2013 21:24:15 -0400
> wget http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl

Yup, sure looks like a bug.

> --8<---------------cut here---------------start------------->8---
> End of `qw( ... )' string/RE not found: (scan-error Unbalanced parentheses 1543 155427)
> --8<---------------cut here---------------end--------------->8---

Probably related, indeed.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 01:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 15755 <at> debbugs.gnu.org,  Jonathan Rockway <jon <at> jrock.us>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 07:28:25 +0530
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> --8<---------------cut here---------------start------------->8---
>> End of `qw( ... )' string/RE not found: (scan-error Unbalanced
>> parentheses 1543 155427)
>> --8<---------------cut here---------------end--------------->8---
>
> Probably related, indeed.

If I remove that "offending" qw sentence, the slowness persists.

It is possible that a perceived unbalanced-ness earlier in the document
only heightens an already existing slowness elsewhere.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 11:59:01 GMT) Full text and rfc822 format available.

Message #20 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 15755 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 07:58:46 -0400
Jambunathan K <kjambunathan <at> gmail.com> writes:

> 5. Move the cursor down a few lines
> 6. C-M-e.  Jump to end of defun. Move up a few lines to seek the comment
>    line.
> 7. Type a few characters
>
> (5) is slow. (7) is very slow.  Meaning it takes ages for the 10 or so
> characters to be echoed.

When I went to reproduce this, I started emacs without the -Q.  What
happened was C-M-e took me to the end of a _different_ defun, and it did
so quickly.  Step 7 wasn't slow for me either.

Indeed, I was able to reproduce this after starting emacs without
loading .emacs.  The funny thing is, the line that seems to be the
difference maker is, of all things:

(defalias 'perl-mode 'cperl-mode)

Without that line, I get the behavior you describe.  With that line, I
get fast but incorrect cperl (C-M-e takes me to the end of the wrong
defun).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 16:57:02 GMT) Full text and rfc822 format available.

Message #23 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: 15755 <at> debbugs.gnu.org, Jambunathan K <kjambunathan <at> gmail.com>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 12:56:12 -0400
> (defalias 'perl-mode 'cperl-mode)

That means you're not using cperl-mode, but perl-mode, which is
a completely different major mode.

> (C-M-e takes me to the end of the wrong defun).

Please report this perl-mode bug, with a reproducible recipe.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 17:24:02 GMT) Full text and rfc822 format available.

Message #26 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15755 <at> debbugs.gnu.org, Jambunathan K <kjambunathan <at> gmail.com>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 13:23:09 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> (defalias 'perl-mode 'cperl-mode)
>
> That means you're not using cperl-mode, but perl-mode, which is
> a completely different major mode.
>
>> (C-M-e takes me to the end of the wrong defun).
>
> Please report this perl-mode bug, with a reproducible recipe.
>
>
>         Stefan

I think you have it backwards.  (defalias 'perl-mode 'cperl-mode) causes
cperl-mode to be used where perl-mode would have been used.  What I was
saying was I can only reproduce the original problem when I _remove_
that line from .emacs and do M-x cperl-mode manually after visiting the
file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Thu, 31 Oct 2013 19:17:01 GMT) Full text and rfc822 format available.

Message #29 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: 15755 <at> debbugs.gnu.org, Jambunathan K <kjambunathan <at> gmail.com>
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Thu, 31 Oct 2013 15:16:01 -0400
> I think you have it backwards.  (defalias 'perl-mode 'cperl-mode) causes

Indeed, sorry,


        Stefan "who seems to need some sleep"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Sun, 10 Nov 2013 05:32:01 GMT) Full text and rfc822 format available.

Message #32 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 15755 <at> debbugs.gnu.org
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Sun, 10 Nov 2013 11:01:14 +0530
A quick update:  Some magic has happened between the following revisions:

   114868 rgm <at> gnu.org-20131030102316-8vif7u6ecyo3yieg
   115051 jan.h.d <at> swipnet.se-20131109111953-cysfi19meuidy96q

The slowdown with the recipe above is not that noticeable now.  Is this
magic or is there an explanation?


Jambunathan K <kjambunathan <at> gmail.com> writes:

> Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>
>>> On my netbook (HP Mini 110) cperl-mode responds so slowly that it is
>>> very annoying to type.
>>
>> Usually, cperl-mode is fast enough (most of my machines are about as
>> powerful as a typical netbook).  So maybe you're just hitting a bug
>> (tho, maybe you're hitting a pathological case, as well).
>>
>> Do you have some test case we can use to reproduce the problem?
>
> If indeed this is a bug, I would call it a "showstopper" for cperl-mode.
>
> Here is a recipe.  The file used below is the Oddmuse's Wiki engine.
>
> mkdir ~/tmp
>
> cd ~/tmp
>
> wget http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl
>
> emacs -Q
>
> Here is a report from M-x view-lossage RET.  I do this:
>
> 1. C-x C-f ~/tmp/wiki.pl
> 2. M-x cperl-mode
> 3. C-s ApplyRules {
> 4. C-a
> 5. Move the cursor down a few lines
> 6. C-M-e.  Jump to end of defun. Move up a few lines to seek the comment
>    line.
> 7. Type a few characters
>
> (5) is slow. (7) is very slow.  Meaning it takes ages for the 10 or so
> characters to be echoed.
>
> Interestingly, after (2) I see the following message reported by
> cperl-mode.  I am not sure whether the error is a cause for slow
> performance.
>
> Anyways, if I do,
>
>     perl wiki.pl
>
> I don't see the perl complaining about the file being bad.  So there is
> a bug somewhere.
>
> Apart from the recipe above, you can try the following
>
> 1. Mark the ApplyRules sub.
> 2. M-x indent-region it.
>
> With perl-mode, (1) and (2) is very quick.  But with cperl-mode things
> are bad.
>
>
>
> End of `qw( ... )' string/RE not found: (scan-error Unbalanced parentheses 1543 155427)
>
> --8<---------------cut here---------------start------------->8---
> C-x C-f t m p / w i k i . p l <return> <escape> x c
> p e r l - m o d e <return> C-s A p p l y R u l e s
> SPC { C-a <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> C-M-e
> <up> <up> <up> C-e SPC i n s e r t i n g SPC t h i
> s SPC t e x t SPC t a k e s SPC a SPC l o t SPC o f
> SPC t i m e <escape> x v i e w - l o s s a g e <re
> turn>
> --8<---------------cut here---------------end--------------->8---
>
>
>
>>         Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15755; Package emacs. (Sun, 10 Nov 2013 13:57:02 GMT) Full text and rfc822 format available.

Message #35 received at 15755 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 15755 <at> debbugs.gnu.org
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Sun, 10 Nov 2013 08:56:18 -0500
> A quick update:  Some magic has happened between the following revisions:

>    114868 rgm <at> gnu.org-20131030102316-8vif7u6ecyo3yieg
>    115051 jan.h.d <at> swipnet.se-20131109111953-cysfi19meuidy96q

> The slowdown with the recipe above is not that noticeable now.  Is this
> magic or is there an explanation?

There's been a bug fix for an inf-loop in cperl-mode, indeed.  I'm not
sure if "not that noticeable now" means that the fix also fixed your
problem, or if your problem remains.


        Stefan




Reply sent to Jambunathan K <kjambunathan <at> gmail.com>:
You have taken responsibility. (Fri, 15 Nov 2013 05:13:02 GMT) Full text and rfc822 format available.

Notification sent to Jambunathan K <kjambunathan <at> gmail.com>:
bug acknowledged by developer. (Fri, 15 Nov 2013 05:13:03 GMT) Full text and rfc822 format available.

Message #40 received at 15755-done <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 15755-done <at> debbugs.gnu.org
Subject: Re: bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
Date: Fri, 15 Nov 2013 10:42:05 +0530
OP here.  Closed.




Forcibly Merged 15755 15771. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:29:02 GMT) Full text and rfc822 format available.

Disconnected #15771 from all other report(s). Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:29:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 12:24:22 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 185 days ago.

Previous Next


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