|Subject:||bug#10652: font-lock very slow for C++|
|Date:||Mon, 02 Apr 2012 09:48:12 +0200|
emacs hangs for hours. Luckily it only used one of my 4 processor cores, so I could leave it loading in the background.
This is what I've done:
Open the file, in c++-mode, and scroll to end-of-buffer (M->). The mouse cursor starts spinning, but the end of buffer is not shown.
When I press C-g three times, the end of the buffer is shown. The fontification looks correct.
When I go back to beginning-of-buffer, same problem.
When I press M->, M-< several times, I cannot recover with C-g and I need to kill emacs:-(
isearch works fine with font-lock-mode disabled.
Even, depending on the position in the buffer, it happens the command M-x font-lock-mode gives the spinning mouse cursor. Again 3x C-g solves this.
So I can say pretty sure, font-lock-mode is causing the "delay".
I've tested again with the bazaar version of last friday.
My test file contains something like this:
And this repeated for something like 20 times (of course with different names, and with different parameters).
The macro is something like:
#define SOME_PRETEST_MACRO if (!Ready()) return -1;
With this test file, I could easily reproduce the problem.
I hope this can help investigating the issue.
On 2012-03-30 00:00, Alan Mackenzie wrote:
Hello, Toon. On Thu, Mar 29, 2012 at 09:46:03PM +0200, Toon Claes wrote:Hi Alan,About: (i) yes I've tried that, emacs -Q didn't make a differenceWorth knowing(ii) I am using emacs from git, commit 2ac37884107bd4e78bb… Should I get it from the bazaar repo?I'm not familiar with the git repository. If the revision is recent (within the last week or two or three) it should be OK. I just wanted to check you weren't using a 6-month old version.(iii) I know font-lock has nothing to do with isearch. When I disable font-lock-mode for the buffer, isearch does not hang. So the issue isn't isearch. Sorry I created some confusion in previous mail.OK. What I suspect is that the isearch works fine, then the fontification hangs before the screen can redisplay. How long does it hang for? Any chance you could perhaps leave it hanging over lunchtime, or perhaps even overnight to see if it might just be _very_ slow. Could you perhaps try disabling font-lock, doing the isearch, then enabling font-lock again. Does it then still hang, or does it come up OK? Lastly, is there anything unusual about your test file. Perhaps long regions of text which contain no semicolons or maybe no braces? Or maybe hundreds of macro definitions one after the other, something like that?Toon
|[Prev in Thread]||Current Thread||[Next in Thread]|