[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slow fontification in C mode buffers
From: |
Kan-Ru Chen |
Subject: |
Re: Slow fontification in C mode buffers |
Date: |
Fri, 16 Dec 2011 10:32:20 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
> Hello, again.
>
> On Fri, Dec 16, 2011 at 12:16:25AM +0800, Kan-Ru Chen wrote:
>> Alan Mackenzie <address@hidden> writes:
>
>> > Would you please try the following patch and let me know how it goes.
>> > Thanks!
>
>> No change. c-cheap-inside-bracelist-p seems not called at all.
>
> Hmm. The place c-cheap-inside-bracelist-p is inside
> c-font-lock-declarations, it can scarcely avoid being called.
>
> Forgive me for asking you this, but are you sure you byte compiled the
> two files after patching them, etc.?
I forgot that I've set font-lock-maximum-decoration to 2. I tested with
emacs -Q again. The first font-lock is slow, but pretty fast after
that. It occasionally hangs when I C-v the buffer. Below is the
elp-results:
Function Name Call Count Elapsed Time Average Time
c-beginning-of-decl-1 1203 269.68204399 0.2241746001
c-beginning-of-statement-1 1242 269.60064599 0.2170697632
c-crosses-statement-barrier-p 241143 258.95701700 0.0010738732
c-font-lock-declarations 179 160.73329700 0.8979513798
c-find-decl-spots 179 160.732037 0.8979443407
c-at-macro-vsemi-p 336240 159.34210499 0.0004738939
c-in-literal 336240 150.66956800 0.0004481012
c-slow-in-literal 336240 149.19536500 0.0004437168
c-literal-limits 374344 85.649792999 0.0002287996
c-beginning-of-syntax 522725 73.183792999 0.0001400043
c-font-lock-enclosing-decls 179 57.476122000 0.3210956536
c-backward-sws 1215297 12.826941000 1.055...e-05
c-beginning-of-macro 746198 4.2144529999 5.647...e-06
c-parse-state 3326 1.0435710000 0.0003137615
c-parse-state-1 3326 0.9558269999 0.0002873803
c-forward-decl-or-cast-1 2089 0.4252059999 0.0002035452
c-append-to-state-cache 3178 0.3954000000 0.0001244178
c-font-lock-declarators 135 0.3788929999 0.0028066148
c-syntactic-re-search-forward 432 0.3418039999 0.0007912129
c-forward-type 5008 0.2934280000 5.859...e-05
c-remove-stale-state-cache 2819 0.2530829999 8.977...e-05
c-font-lock-<>-arglists 179 0.1875940000 0.0010480111
c-font-lock-enum-tail 179 0.1730750000 0.0009668994
c-parse-state-get-strategy 3326 0.149166 4.484...e-05
c-get-fallback-scan-pos 330 0.1159620000 0.0003514000
c-forward-name 3509 0.1159080000 3.303...e-05
c-remove-stale-state-cache-backwards 507 0.1071120000 0.0002112662
c-font-lock-complex-decl-prepare 179 0.0924410000 0.0005164301
c-backward-token-2 6514 0.0913669999 1.402...e-05
c-cheap-inside-bracelist-p 1954 0.0872260000 4.463...e-05
c-state-literal-at 520 0.0582760000 0.0001120692
c-forward-label 707 0.0382930000 5.416...e-05
c-at-toplevel-p 128 0.0342679999 0.0002677187
c-syntactic-content 2688 0.0300650000 1.118...e-05
c-forward-sws 8547 0.0256289999 2.998...e-06
c-state-balance-parens-backwards 506 0.0250620000 4.952...e-05
c-search-uplist-for-classkey 128 0.0244740000 0.0001912031
c-looking-at-decl-block 128 0.0230999999 0.0001804687
c-syntactic-skip-backward 128 0.0213989999 0.0001671796
c-after-conditional 204 0.0180919999 8.868...e-05
c-beginning-of-current-token 4902 0.0143600000 2.929...e-06
c-get-cache-scan-pos 3474 0.0119859999 3.450...e-06
c-end-of-macro 2192 0.0077970000 3.557...e-06
c-syntactic-end-of-macro 245 0.0049240000 2.009...e-05
c-add-type 258 0.0042930000 1.663...e-05
c-looking-at-inexpr-block 95 0.0039379999 4.145...e-05
c-forward-annotation 2089 0.0028189999 1.349...e-06
c-skip-comments-and-strings 1694 0.0025100000 1.481...e-06
c-font-lock-invalid-string 392 0.0018759999 4.785...e-06
c-state-get-min-scan-pos 3674 0.0011130000 3.029...e-07
c-most-enclosing-brace 1142 0.0008480000 7.425...e-07
c-fontify-recorded-types-and-refs 475 0.0005930000 1.248...e-06
c-forward-keyword-clause 33 0.000508 1.539...e-05
c-append-lower-brace-pair-to-state-cache 1 0.00038 0.00038
c-safe-position 256 0.0003150000 1.230...e-06
c-forward-to-cpp-define-body 32 0.0002930000 9.156...e-06
c-end-of-current-token 32 6.500...e-05 2.031...e-06
c-leave-cc-mode-mode 6 1.300...e-05 2.166...e-06
c-forward-single-comment 2 1e-05 5e-06
--
Kanru
- Re: Slow fontification in C mode buffers, (continued)
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/15
- Re: Slow fontification in C mode buffers, Kan-Ru Chen, 2011/12/15
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/15
- Re: Slow fontification in C mode buffers,
Kan-Ru Chen <=
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/16
- Re: Slow fontification in C mode buffers, Kan-Ru Chen, 2011/12/17
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/21
- Re: Slow fontification in C mode buffers, Geoff Gole, 2011/12/21
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/21
- Re: Slow fontification in C mode buffers, Geoff Gole, 2011/12/21
- Re: Slow fontification in C mode buffers, Alan Mackenzie, 2011/12/21
- Re: Slow fontification in C mode buffers, Eli Zaretskii, 2011/12/21
- Re: Slow fontification in C mode buffers, Geoff Gole, 2011/12/21
- Re: Slow fontification in C mode buffers, Eli Zaretskii, 2011/12/21