unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* emacs hangs in jit-lock
@ 2006-11-28 17:23 Sam Steingold
  2006-11-28 20:03 ` Chong Yidong
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Sam Steingold @ 2006-11-28 17:23 UTC (permalink / raw)


GNU Emacs 22.0.91.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
  of 2006-11-27 on loiso

I am suffering from an Emacs performance problem: when I open "too many
bad files" (say, total 10,000 lines of C code without a single #\{ or
#\( in the first column), Emacs becomes unresponsive.
Every now and then it hangs (taking up 100% of the CPU).
Some typical backtraces:

Lisp Backtrace:
"line-end-position" (0x29e02)
"back-to-indentation" (0x2e0)
"c-beginning-of-macro" (0x27bda8)
"byte-code" (0xa5c7eab)
"c-parse-state" (0x27bda8)
"c-font-lock-complex-decl-prepare" (0x27d0b8)
"font-lock-fontify-keywords-region" (0x27bda8)
"font-lock-default-fontify-region" (0x27bda8)
"font-lock-fontify-region" (0x27bda8)
"run-hook-with-args" (0x840af31)
"byte-code" (0x822f25b)
"jit-lock-fontify-now" (0x27bed8)
"jit-lock-stealth-fontify" (0x83178f9)
"apply" (0x85053d9)
"byte-code" (0x8235b5b)
"timer-event-handler" (0x9867c1c)

Lisp Backtrace:
"byte-code" (0xa5c7eab)
"c-parse-state" (0x285560)
"c-font-lock-complex-decl-prepare" (0x2867f0)
"font-lock-fontify-keywords-region" (0x285560)
"font-lock-default-fontify-region" (0x285560)
"font-lock-fontify-region" (0x285560)
"run-hook-with-args" (0x840af31)
"byte-code" (0x822f25b)
"jit-lock-fontify-now" (0x285648)
"jit-lock-stealth-fontify" (0x83178f9)
"apply" (0x85053d9)
"byte-code" (0x8235b5b)
"timer-event-handler" (0x9867c1c)

Lisp Backtrace:
"re-search-backward" (0xa8972db)
"d-mode-beg-of-defun" (0x8)
"beginning-of-defun-raw" (0x83178c9)
"beginning-of-defun" (0x10)
"c-get-fallback-start-pos" (0x2dbbd0)
"c-parse-state" (0x2dbbd0)
"c-font-lock-complex-decl-prepare" (0x2dcb98)
"font-lock-fontify-keywords-region" (0x2dbbd0)
"font-lock-default-fontify-region" (0x2dbbd0)
"font-lock-fontify-region" (0x2dbbd0)
"run-hook-with-args" (0x840af31)
"byte-code" (0x822f25b)
"jit-lock-fontify-now" (0x2dbbd0)
"jit-lock-stealth-fontify" (0x83178f9)
"apply" (0x85053d9)
"byte-code" (0x8235b5b)
"timer-event-handler" (0x9867c1c)
"read-event" (0x95b932c)
"byte-code" (0x8231eb3)
"mouse-show-mark" (0x1f690)
"mouse-drag-track" (0x9e34fc5)
"mouse-drag-region" (0x9e34fc5)
"call-interactively" (0x8539e89)

Lisp Backtrace:
"read-event" (0x95b932c)
"byte-code" (0x8231eb3)
"mouse-show-mark" (0x1f690)
"mouse-drag-track" (0x9e34fc5)
"mouse-drag-region" (0x9e34fc5)
"call-interactively" (0x8539e89)

Lisp Backtrace:
"c-beginning-of-macro" (0x28b770)
"byte-code" (0xa5c7eab)
"c-parse-state" (0x28b870)
"c-font-lock-complex-decl-prepare" (0x28c9e8)
"font-lock-fontify-keywords-region" (0x28b870)
"font-lock-default-fontify-region" (0x28b870)
"font-lock-fontify-region" (0x28b870)
"run-hook-with-args" (0x840af31)
"byte-code" (0x822f25b)
"jit-lock-fontify-now" (0x28b958)
"jit-lock-stealth-fontify" (0x83178f9)
"apply" (0x85053d9)
"byte-code" (0x8235b5b)
"timer-event-handler" (0x9867c1c)

the problem is that this unresponsiveness can last for MINUTES (I am not
making this up!) and the periods of responsiveness can last for mere
SECONDS.
I understand what Emacs is trying to do, but, really, this "background"
refontification should not take that much time (I have a fairly modern
desktop, in time Emacs takes to parse the files I think I could have
done it by hand with a pencil).
Even if it should, any input from me should immediately interrupt it -
and I see my C-g "delayed" for minutes.
This is a very serious problem for me.
Thanks.

Sam.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-12-04 14:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-28 17:23 emacs hangs in jit-lock Sam Steingold
2006-11-28 20:03 ` Chong Yidong
2006-11-28 20:13   ` Sam Steingold
2006-11-30  0:12     ` Henrik Enberg
2006-11-30  4:21       ` Stefan Monnier
2006-11-30  4:37         ` Chong Yidong
2006-11-30  9:29         ` martin rudalics
2006-11-30 14:41           ` Stefan Monnier
2006-11-30 18:16             ` martin rudalics
2006-11-30 18:46               ` Stefan Monnier
2006-11-30 22:49                 ` martin rudalics
2006-12-01 13:37                 ` Richard Stallman
2006-12-01 15:56                   ` martin rudalics
2006-12-02 17:56                     ` Richard Stallman
2006-12-02 17:56         ` Richard Stallman
2006-12-04  0:19           ` Chong Yidong
2006-12-04 14:21             ` Richard Stallman
2006-11-28 22:17 ` martin rudalics
2006-11-29  3:29 ` Richard Stallman

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).