all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Dave Milter" <davemilter@gmail.com>
To: "Alan Mackenzie" <acm@muc.de>
Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org
Subject: Re: open large file with C code: is it realy should be so slow?
Date: Mon, 5 Jan 2009 01:07:18 +0300	[thread overview]
Message-ID: <2a382c6e0901041407w2ca824cdy88d1529af8966069@mail.gmail.com> (raw)
In-Reply-To: <20081201123716.GA3603@muc.de>

On Mon, Dec 1, 2008 at 3:37 PM, Alan Mackenzie <acm@muc.de> wrote:
>
> On Mon, Dec 01, 2008 at 01:01:08PM +0300, Dave Milter wrote:
>> 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?
>
> It's a bug.
>
> Although C Mode works "properly" here, it doesn't seem to be tuned very
> well for files like this one (At91SAM9253_inc.h), which contain a lot of
> #defines and comments and nothing else.
>

I made some more testing (to find out problem in "file", or in "large"),
because of really want to see this bug fixed,

I see the same behaviour on file created by

for ((i=0;i<500;++i)); do echo "extern void f${i}(int a${i});"; done

emacs from cvs and emacs 22 show the same behaviour -
eating 100% of cpu, if make fast scrolling.

>
>> elp results are:
>

Function Name                                              Call Count
Elapsed Time  Average Time
=========================================================  ==========
============  ============
font-lock-fontify-region                                   41
230.65321899  5.6256882682
font-lock-default-fontify-region                           41
230.65264900  5.6256743658
font-lock-fontify-keywords-region                          41
230.61167599  5.6246750243
font-lock-fontify-syntactically-region                     41
0.039573      0.0009651951
font-lock-unfontify-region                                 41
0.0005050000  1.231...e-05
font-lock-default-unfontify-region                         41
0.0001930000  4.707...e-06
font-lock-extend-region-wholelines                         41
0.0001080000  2.634...e-06
font-lock-extend-region-multiline                          41
9.800...e-05  2.390...e-06
font-lock-set-defaults                                     41
8.299...e-05  2.024...e-06
font-lock-mode                                             3
7.6e-05       2.533...e-05
font-lock-default-function                                 3
1.400...e-05  4.666...e-06


In fact, with small files, for example the same script but 5000 -> 500,
I see the same situation, but after eating cpu during some period,
it never eating it after, and all works smoothly,
while with big files it eats it every fast scroll.




  reply	other threads:[~2009-01-04 22:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01 10:01 open large file with C code: is it realy should be so slow? Dave Milter
2008-12-01 12:37 ` Alan Mackenzie
2009-01-04 22:07   ` Dave Milter [this message]
2009-01-04 23:31     ` Alan Mackenzie
2009-11-01 17:01       ` Dave Milter
2009-01-06  0:01     ` Richard M Stallman
2009-01-06  5:52       ` Chong Yidong
2009-01-06 22:59         ` Richard M Stallman
2009-01-07  1:16           ` Chong Yidong
2009-01-08 11:37             ` Richard M Stallman
2009-01-08 12:42               ` Alan Mackenzie
2009-01-06 19:03       ` Alan Mackenzie
2009-01-06 21:50         ` Stefan Monnier
2009-12-04 15:25     ` Alan Mackenzie
2009-12-19 10:51       ` Dave Milter
2009-12-27 10:33         ` Dave Milter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a382c6e0901041407w2ca824cdy88d1529af8966069@mail.gmail.com \
    --to=davemilter@gmail.com \
    --cc=acm@muc.de \
    --cc=bug-cc-mode@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.