From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: emacs hangs in jit-lock Date: Tue, 28 Nov 2006 12:23:44 -0500 Message-ID: <456C70A0.6060105@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164735055 20760 80.91.229.2 (28 Nov 2006 17:30:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2006 17:30:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 28 18:30:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gp6mk-0007eA-NV for ged-emacs-devel@m.gmane.org; Tue, 28 Nov 2006 18:30:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gp6mj-0004Jz-HD for ged-emacs-devel@m.gmane.org; Tue, 28 Nov 2006 12:30:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gp6gU-0006Qe-R5 for emacs-devel@gnu.org; Tue, 28 Nov 2006 12:23:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gp6gP-0006Jq-ED for emacs-devel@gnu.org; Tue, 28 Nov 2006 12:23:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gp6gO-0006JP-MG for emacs-devel@gnu.org; Tue, 28 Nov 2006 12:23:48 -0500 Original-Received: from [66.155.124.107] (helo=janestcapital.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gp6gN-00046w-Ta for emacs-devel@gnu.org; Tue, 28 Nov 2006 12:23:48 -0500 Original-Received: from [192.168.250.217] [209.213.205.130] by janestcapital.com with ESMTP (SMTPD-9.10) id A0A01308; Tue, 28 Nov 2006 12:23:44 -0500 User-Agent: Thunderbird 1.5.0.7 (X11/20060913) Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62969 Archived-At: 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.