[Bug 383475] New: emacs loops opening single C++ source line
https://bugzilla.novell.com/show_bug.cgi?id=383475 Summary: emacs loops opening single C++ source line Product: openSUSE 11.0 Version: Factory Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: koenig@linux.de QAContact: qa@suse.de Found By: --- trying to open the atteched file "x.cc" emacs loops and hogs memory. actually this already happend when I tried to enlarge that string by typing CTRL-U 9999 X to add another 10K "X" characters. that operation did never complete:-( first I used CTRL-U 999 X for the first 999 Xs which was ok, emacs didn't start looping with that. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383475
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c1
--- Comment #1 from Harald Koenig
https://bugzilla.novell.com/show_bug.cgi?id=383475
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c2
--- Comment #2 from Harald Koenig
Created an attachment (id=210300) --> (https://bugzilla.novell.com/attachment.cgi?id=210300) [details] emacs loops when reading/displaying this file
FYI: if the file is called "x.c" instead of "x.cc", emacs is fine... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383475
Martin Mrazik
https://bugzilla.novell.com/show_bug.cgi?id=383475
User mfabian@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c3
Mike Fabian
https://bugzilla.novell.com/show_bug.cgi?id=383475
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c4
--- Comment #4 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=383475
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c5
--- Comment #5 from Harald Koenig
Harald: Which version of emacs do you have used? GNU Emacs or Xemacs? In GNU Emacs you may type Ctrl-h Ctrl-e and search for fontification.
I was using plain (gnu-) emacs (even in text mode first). usually I have all the color stuff disabled, but by accident... (In reply to comment #3 from Mike Fabian)
I cannot reproduce this with GNU Emacs. GNU Emacs takes a *long* time to open this file but finally manages it.
so you actually can reproduce this problem ;-) before reporting I was just a little bit too impatient ;-) hey, it took 45 cpu-secs on my 2 GHz T7200 (64bit core2duo), that's just insane for a single line of C++ code (ok, it's 10K characters but...) using cp x.cc x.c emacs -q x.c is _much_ faster (but obviously not a solution for the generic case;)
Same with XEmacs. XEmacs loads the file rather fast if started with the default setup:
xemacs -q
correct, ~2 cpu-secs
The buffer is then not fontified (i.e. not coloured), XEmacs doesn’t use font-lock by default.
Switching on fontlock then by
M-x font-lock-mode RET
takes a *very* long time but XEmacs finally manages.
ouch, you're right :-(
As GNU Emacs has fontlock on by default, I think the problem is that the fontlock algorithm is very slow for that type of file.
And apparently even slower in XEmacs than in GNU Emacs.
But the font-locking finally finishes.
hmm, well :-( looks like a an item for a report to gnu-/x-emacs maintainers... just FYI: I've tried older emacs versions on other platforms which I've build myself from source: always the same behaviour. so at least it's not that specific emacs version nor the 11.0-beta environment. good for you ;-) bad for emacs :-( thanks, Harald -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=383475
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c6
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=383475
User mfabian@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c7
--- Comment #7 from Mike Fabian
https://bugzilla.novell.com/show_bug.cgi?id=383475
User mfabian@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=383475#c8
--- Comment #8 from Mike Fabian
participants (1)
-
bugzilla_noreply@novell.com