* Slow cperl-mode in emacs 22 & 23
@ 2009-04-03 13:09 Hinrik Örn Sigurðsson
2009-04-03 13:10 ` Hinrik Örn Sigurðsson
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-03 13:09 UTC (permalink / raw)
To: help-gnu-emacs
I'm new to emacs and the first thing I tried after installing it was
to edit a Perl file (~3000 lines) and switch to cperl-mode (via M-x
cperl-mode). Moving around in the file with cperl-mode is very slow. I
have to wait at least a second to see results after hitting Page Down.
Editing smaller files (~500 lines) is faster but still a little
sluggish. The default perl-mode is very fast in all cases.
I have done no configuration (no ~/.emacs or ~/.emacs.d). I tried
emacs 22.2 and two snapshots of emacs 23 (2008-10-13 and 2009-03-20),
they all have this speed issue in cperl-mode. I'm running Ubuntu 8.10.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Slow cperl-mode in emacs 22 & 23
2009-04-03 13:09 Hinrik Örn Sigurðsson
@ 2009-04-03 13:10 ` Hinrik Örn Sigurðsson
2009-04-03 14:10 ` Hinrik Örn Sigurðsson
2009-04-05 0:15 ` Hinrik Örn Sigurðsson
2 siblings, 0 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-03 13:10 UTC (permalink / raw)
To: help-gnu-emacs
I forgot to add that I get same the results whether I'm in the console
or the GUI.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Slow cperl-mode in emacs 22 & 23
2009-04-03 13:09 Hinrik Örn Sigurðsson
2009-04-03 13:10 ` Hinrik Örn Sigurðsson
@ 2009-04-03 14:10 ` Hinrik Örn Sigurðsson
2009-04-05 0:15 ` Hinrik Örn Sigurðsson
2 siblings, 0 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-03 14:10 UTC (permalink / raw)
To: help-gnu-emacs
Oh, and I tried it on both my laptop and workstation. Same deal.
This is the Perl file in question, if anyone's interested:
http://cpansearch.perl.org/src/BINGOS/POE-Component-IRC-6.04/lib/POE/Component/IRC.pm
^ permalink raw reply [flat|nested] 7+ messages in thread
* Slow cperl-mode in emacs 22 & 23
@ 2009-04-03 22:26 Hinrik Örn Sigurðsson
2009-04-04 3:56 ` Hinrik Örn Sigurðsson
[not found] ` <mailman.4593.1238817391.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-03 22:26 UTC (permalink / raw)
To: help-gnu-emacs
(It seems my original email didn't make it to the list. I'm trying again now.)
I'm new to emacs and the first thing I tried after installing it was
to edit a Perl file (~3000 lines) and switch to cperl-mode (via M-x
cperl-mode). Moving around in the file with cperl-mode is very slow. I
have to wait at least a second to see results after hitting Page Down.
Editing smaller files (~500 lines) is faster but still a little
sluggish. The default perl-mode is very fast in all cases.
I get same the results whether I'm in the console
or the GUI, and whether I'm on my laptop or workstation (both Ubuntu 8.10).
I have done no configuration (no ~/.emacs or ~/.emacs.d). I tried
emacs 22.2 and two snapshots of emacs 23 (2008-10-13 and 2009-03-20).
They all have the same issue.
This is the Perl file in question, if anyone's interested:
http://cpansearch.perl.org/src/BINGOS/POE-Component-IRC-6.04/lib/POE/Component/IRC.pm
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Slow cperl-mode in emacs 22 & 23
2009-04-03 22:26 Slow cperl-mode in emacs 22 & 23 Hinrik Örn Sigurðsson
@ 2009-04-04 3:56 ` Hinrik Örn Sigurðsson
[not found] ` <mailman.4593.1238817391.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-04 3:56 UTC (permalink / raw)
To: help-gnu-emacs
Same deal with a fresh cvs checkout of emacs.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Slow cperl-mode in emacs 22 & 23
2009-04-03 13:09 Hinrik Örn Sigurðsson
2009-04-03 13:10 ` Hinrik Örn Sigurðsson
2009-04-03 14:10 ` Hinrik Örn Sigurðsson
@ 2009-04-05 0:15 ` Hinrik Örn Sigurðsson
2 siblings, 0 replies; 7+ messages in thread
From: Hinrik Örn Sigurðsson @ 2009-04-05 0:15 UTC (permalink / raw)
To: help-gnu-emacs
This problem has been resolved. Apparently cperl-mode will be slow if
loaded on top of perl-mode. Putting the following in my ~/.emacs fixed
it:
(defalias 'perl-mode 'cperl-mode)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Slow cperl-mode in emacs 22 & 23
[not found] ` <mailman.4593.1238817391.31690.help-gnu-emacs@gnu.org>
@ 2009-04-05 0:34 ` Tim X
0 siblings, 0 replies; 7+ messages in thread
From: Tim X @ 2009-04-05 0:34 UTC (permalink / raw)
To: help-gnu-emacs
Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> writes:
> Same deal with a fresh cvs checkout of emacs.
>
>
I've not used cperl-mode for a while, but some points to consider....
1. In one of your posts, you mentioned a reference to cpan. Are you
using a version of cperl from cpan or the one that comes bundled with
emacs?
2. Be careful regarding cperl version numbers. It is a little confusing
as there is one 'fork' of cperl that is bundled with emacs and another
which is maintained by the author. The version numbers are not in sync
(at least they didn't use to be), so it can sometimes be a bit
confusing as to whether your running the latest version or not. Best
thing to do is get the latest version from the author's website
http://math.berkeley.edu/~ilya/software/emacs/
Ilya is a regular contributor to this group, so you may be lucky enough
to get a response directly from the mode author.
3. Note that cperl mode has some pretty advanced features and is quite
customizable. On large files, you may get better resonse if you turn off
some of the options, particularly the 'hairy' ones may have significant
performance impact on a large file. Try turning some of them off and
then re-enabling different bits and see if that helps with the
performance.
4. A 3,000 line perl script sounds a tad scarey. I like perl and have in
the past spent many months working exclusively in perl. One lesson I
learnt was to keep my perl source files as small as possible. I've found
things a lot easier if the code is broken up into your own
modules. Maybe that would help?
regards,
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-05 0:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 22:26 Slow cperl-mode in emacs 22 & 23 Hinrik Örn Sigurðsson
2009-04-04 3:56 ` Hinrik Örn Sigurðsson
[not found] ` <mailman.4593.1238817391.31690.help-gnu-emacs@gnu.org>
2009-04-05 0:34 ` Tim X
-- strict thread matches above, loose matches on Subject: below --
2009-04-03 13:09 Hinrik Örn Sigurðsson
2009-04-03 13:10 ` Hinrik Örn Sigurðsson
2009-04-03 14:10 ` Hinrik Örn Sigurðsson
2009-04-05 0:15 ` Hinrik Örn Sigurðsson
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).