* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
@ 2013-10-30 13:29 Jambunathan K
2013-10-30 18:13 ` Stefan Monnier
2013-11-15 5:12 ` Jambunathan K
0 siblings, 2 replies; 12+ messages in thread
From: Jambunathan K @ 2013-10-30 13:29 UTC (permalink / raw)
To: 15755
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@gnu.org-20131030102316-8vif7u6ecyo3yieg
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description: Debian GNU/Linux 6.0.5 (squeeze)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 13:29 bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook Jambunathan K
@ 2013-10-30 18:13 ` Stefan Monnier
2013-10-30 19:43 ` Jambunathan K
2013-11-15 5:12 ` Jambunathan K
1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2013-10-30 18:13 UTC (permalink / raw)
To: Jambunathan K; +Cc: 15755
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 18:13 ` Stefan Monnier
@ 2013-10-30 19:43 ` Jambunathan K
2013-10-31 1:24 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Jambunathan K @ 2013-10-30 19:43 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15755
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
Stefan Monnier <monnier@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---
[-- Attachment #2: cperl-lossage.txt --]
[-- Type: text/plain, Size: 370 bytes --]
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>
[-- Attachment #3: Type: text/plain, Size: 86 bytes --]
--8<---------------cut here---------------end--------------->8---
> Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 19:43 ` Jambunathan K
@ 2013-10-31 1:24 ` Stefan Monnier
2013-10-31 1:58 ` Jambunathan K
2013-10-31 11:58 ` Nathan Trapuzzano
2013-11-10 5:31 ` Jambunathan K
2 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2013-10-31 1:24 UTC (permalink / raw)
To: Jambunathan K; +Cc: 15755, Jonathan Rockway
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-31 1:24 ` Stefan Monnier
@ 2013-10-31 1:58 ` Jambunathan K
0 siblings, 0 replies; 12+ messages in thread
From: Jambunathan K @ 2013-10-31 1:58 UTC (permalink / raw)
To: 15755, Jonathan Rockway
Stefan Monnier <monnier@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 19:43 ` Jambunathan K
2013-10-31 1:24 ` Stefan Monnier
@ 2013-10-31 11:58 ` Nathan Trapuzzano
2013-10-31 16:56 ` Stefan Monnier
2013-11-10 5:31 ` Jambunathan K
2 siblings, 1 reply; 12+ messages in thread
From: Nathan Trapuzzano @ 2013-10-31 11:58 UTC (permalink / raw)
To: Jambunathan K; +Cc: 15755
Jambunathan K <kjambunathan@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).
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-31 11:58 ` Nathan Trapuzzano
@ 2013-10-31 16:56 ` Stefan Monnier
2013-10-31 17:23 ` Nathan Trapuzzano
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2013-10-31 16:56 UTC (permalink / raw)
To: Nathan Trapuzzano; +Cc: 15755, Jambunathan K
> (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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-31 16:56 ` Stefan Monnier
@ 2013-10-31 17:23 ` Nathan Trapuzzano
2013-10-31 19:16 ` Stefan Monnier
0 siblings, 1 reply; 12+ messages in thread
From: Nathan Trapuzzano @ 2013-10-31 17:23 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15755, Jambunathan K
Stefan Monnier <monnier@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 19:43 ` Jambunathan K
2013-10-31 1:24 ` Stefan Monnier
2013-10-31 11:58 ` Nathan Trapuzzano
@ 2013-11-10 5:31 ` Jambunathan K
2013-11-10 13:56 ` Stefan Monnier
2 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2013-11-10 5:31 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 15755
A quick update: Some magic has happened between the following revisions:
114868 rgm@gnu.org-20131030102316-8vif7u6ecyo3yieg
115051 jan.h.d@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@gmail.com> writes:
> Stefan Monnier <monnier@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-11-10 5:31 ` Jambunathan K
@ 2013-11-10 13:56 ` Stefan Monnier
0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2013-11-10 13:56 UTC (permalink / raw)
To: Jambunathan K; +Cc: 15755
> A quick update: Some magic has happened between the following revisions:
> 114868 rgm@gnu.org-20131030102316-8vif7u6ecyo3yieg
> 115051 jan.h.d@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook
2013-10-30 13:29 bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook Jambunathan K
2013-10-30 18:13 ` Stefan Monnier
@ 2013-11-15 5:12 ` Jambunathan K
1 sibling, 0 replies; 12+ messages in thread
From: Jambunathan K @ 2013-11-15 5:12 UTC (permalink / raw)
To: 15755-done
OP here. Closed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-11-15 5:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30 13:29 bug#15755: 24.3.50; cperl-mode annoyingly slow on my netbook Jambunathan K
2013-10-30 18:13 ` Stefan Monnier
2013-10-30 19:43 ` Jambunathan K
2013-10-31 1:24 ` Stefan Monnier
2013-10-31 1:58 ` Jambunathan K
2013-10-31 11:58 ` Nathan Trapuzzano
2013-10-31 16:56 ` Stefan Monnier
2013-10-31 17:23 ` Nathan Trapuzzano
2013-10-31 19:16 ` Stefan Monnier
2013-11-10 5:31 ` Jambunathan K
2013-11-10 13:56 ` Stefan Monnier
2013-11-15 5:12 ` Jambunathan K
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).