Aarrgghh!

It seems between cperl-mode v5.0 and v5.3 something broke. I have a file with perl code that sends my emacs into a tight CPU spin and the only way out is to kill emacs-x!

Every version of cperl-mode from v5.3 onwards appears to exhibit this behaviour on my particular text file. I can't show you this file, however, because it is corporate code :(

I've tried v5.3 v5.10 v5.12 v5.13 and they all die when trying to load this file.. v5.0 and v4.23 work fine.. What changed between v5.0 and v5.3..

update: it appears that having space characters on empty lines following a piece of code takes an exponentially long time to process (depending on how many space characters there are).. The following code exhibits this problem:

#.-*-CPerl-*- { ....foreach.(.qw(.hello.goodbye.).).{ ........if ( 1 ) { ............my ...... ............
but be sure to s/./ /sg before loading this into cperl-mode! You'll note that every space character you add to the 2nd last line will take an exponentially longer time to process.

update: after e-mailing Ilya Zakharevich yesterday I've already had a response, and v5.14 of cperl-mode has been released which handles the scenario I wrote about here! Great stuff!


In reply to Re^2: new version of emacs cperl-mode available for testing by monarch
in thread new version of emacs cperl-mode available for testing by ysth

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.