From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Dave Milter" Newsgroups: gmane.emacs.devel Subject: open large file with C code: is it realy should be so slow? Date: Mon, 1 Dec 2008 13:01:08 +0300 Message-ID: <2a382c6e0812010201h7a2507fbg66a38f392d9837a9@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228125761 25645 80.91.229.12 (1 Dec 2008 10:02:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2008 10:02:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 11:03:46 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L75d3-0004Ul-3j for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 11:03:45 +0100 Original-Received: from localhost ([127.0.0.1]:35205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L75bs-0003d4-U7 for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 05:02:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L75ac-00033U-PJ for emacs-devel@gnu.org; Mon, 01 Dec 2008 05:01:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L75ab-00032k-9g for emacs-devel@gnu.org; Mon, 01 Dec 2008 05:01:13 -0500 Original-Received: from [199.232.76.173] (port=57646 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L75aa-00032W-RF for emacs-devel@gnu.org; Mon, 01 Dec 2008 05:01:12 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.153]:55030) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L75aZ-00034A-K3 for emacs-devel@gnu.org; Mon, 01 Dec 2008 05:01:12 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so1887493fgb.30 for ; Mon, 01 Dec 2008 02:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=qOfbe2hJTwSWRxdFHPodf8TSdv37poaC0/R86K5ygC0=; b=uiW+NdkATEZBFm9TwgO5R+ktkSfGRf/5mcc8VfOU7fz2XJwBa/AYzln2CNfqLjmTXf QwAaFn/dzESssTYM5+SOh2JC9y0t91SDryQCk9o978wi4nv/lgX/ScJEJ0RekVWgfpUm g0Rk3pjAm/cSReErN7YED9tf6li8PypL83T34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=vfiTpj5UiCMwulPaPPpSZXl5i6bZVzr7n8cAeY3/9ZyuVdqghkGsQcdJZPfmdFwygC F67zno6letpEf/cxiVVj+0ETeZ2dSCBEZE3MctpvH6ww/etSRBK43nfz4t1gMprP5Odt BHivZ+xQSGuG1INmyxm7LSL20CYqn75Qly4QM= Original-Received: by 10.181.219.15 with SMTP id w15mr3871388bkq.90.1228125668914; Mon, 01 Dec 2008 02:01:08 -0800 (PST) Original-Received: by 10.180.253.7 with HTTP; Mon, 1 Dec 2008 02:01:08 -0800 (PST) Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:106361 Archived-At: I have problem with emacs responsibility, I work with large enough C header files, and when I want to scroll it using mouse's wheel or page (up|down) keys emacs stop react on any keys, like (ctrl+g), and eats 100% of CPU's time during long period, I wonder is this a bug, or expected behaviour? My cpu frequnce is 2200.000MHz. elp results are: Function Name Call Count Elapsed Time Average Time ========================================================= ========== ============ ============ font-lock-fontify-region 387 14.909457999 0.0385257312 font-lock-default-fontify-region 387 14.904738000 0.0385135348 font-lock-fontify-keywords-region 387 14.469801 0.0373896666 font-lock-fontify-syntactically-region 384 0.4169809999 0.0010858880 font-lock-unfontify-region 387 0.0036489999 9.428...e-06 font-lock-mode 17 0.0036209999 0.0002129999 font-lock-set-defaults 390 0.0035869999 9.197...e-06 font-lock-default-function 17 0.0033780000 0.0001987058 font-lock-mode-internal 3 0.00324 0.00108 font-lock-compile-keywords 3 0.002872 0.0009573333 font-lock-compile-keyword 60 0.0027359999 4.559...e-05 font-lock-extend-region-multiline 387 0.0010560000 2.728...e-06 font-lock-default-unfontify-region 387 0.0010289999 2.658...e-06 font-lock-extend-region-wholelines 387 0.0008740000 2.258...e-06 font-lock-extend-jit-lock-region-after-change 103 0.0007060000 6.854...e-06 font-lock-turn-on-thing-lock 3 0.00034 0.0001133333 font-lock-change-mode 5 0.000144 2.880...e-05 font-lock-eval-keywords 4 2.7e-05 6.75e-06 font-lock-value-in-major-mode 8 9e-06 1.125e-06 cc-imenu-init 1 7e-06 7e-06 font-lock-append-text-property 1 6e-06 6e-06 font-lock-choose-keywords 2 4.999...e-06 2.499...e-06 Version: GNU Emacs 22.3.1 (i686-pc-linux-gnu, GTK+ Version 2.12.8) I tried Visual C++ 6.0 under wine, and gvim, and they works without any delays, highlight syntax and allow scrolling. If somebody wnat reproduce this behaviour, here is link to source code with which I working: http://www.atmel.com/dyn/resources/prod_documents/AT91Bootstrap1.10.zip there are files in it like include/AT91SAM9263_inc.h it contains around 4000 lines of code, most of which is comments or #define