[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scrolling huge buffers and cc-mode
From: |
Dmitry Antipov |
Subject: |
Re: Scrolling huge buffers and cc-mode |
Date: |
Wed, 19 Dec 2012 11:20:55 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
It looks like the reason of slow scrolling is how the C++ namespaces are
handled.
Basically my test file is:
namespace X {
namespace Y {
/* 13K lines of code */
} }
/* middle-point */
namespace X {
namespace Y {
/* 13K lines of code */
} }
When scrolling reaches middle-point, everything hangs, most probably because
we need to scan huge regions (first and second namespace blocks). When I remove
all namespace definitions (with matched '}'), scrolling works much faster.
Corresponding profile is:
13.04% emacs emacs [.] mark_object
7.70% emacs emacs [.] exec_byte_code
6.79% emacs emacs [.] re_match_2_internal
6.48% emacs emacs [.] lookup_char_property
4.70% emacs emacs [.] scan_sexps_forward
4.67% emacs emacs [.] Fgarbage_collect
4.62% emacs emacs [.] re_compile_pattern
4.57% emacs emacs [.] next_interval
3.29% emacs emacs [.] find_interval
3.16% emacs emacs [.] mark_interval
2.15% emacs emacs [.] Fcdr
2.06% emacs emacs [.] update_syntax_table
1.83% emacs emacs [.] Flocal_variable_p
1.33% emacs emacs [.] Fassq
1.19% emacs emacs [.]
balance_intervals_internal
1.13% emacs emacs [.] Ffuncall
1.00% emacs emacs [.] compile_pattern
This is very similar to what I'm seeing while scrolling over xdisp.c:
13.92% emacs emacs [.] mark_object
8.20% emacs emacs [.] exec_byte_code
4.91% emacs emacs [.] re_match_2_internal
4.78% emacs emacs [.] Fgarbage_collect
4.65% emacs emacs [.] lookup_char_property
3.60% emacs emacs [.] find_interval
3.55% emacs emacs [.] scan_sexps_forward
3.45% emacs emacs [.] re_compile_pattern
2.77% emacs emacs [.] Flocal_variable_p
2.71% emacs emacs [.] mark_interval
2.46% emacs emacs [.] next_interval
1.62% emacs emacs [.] update_syntax_table
1.52% emacs emacs [.] Fassq
1.45% emacs emacs [.] Fcdr
1.35% emacs emacs [.] Ffuncall
1.11% emacs emacs [.] compile_pattern
Dmitry
- Scrolling huge buffers and cc-mode, Dmitry Antipov, 2012/12/18
- Re: Scrolling huge buffers and cc-mode, Eli Zaretskii, 2012/12/18
- Re: Scrolling huge buffers and cc-mode, Stefan Monnier, 2012/12/18
- Re: Scrolling huge buffers and cc-mode, Alan Mackenzie, 2012/12/20
- Re: Scrolling huge buffers and cc-mode, Dmitry Antipov, 2012/12/21
- Re: Scrolling huge buffers and cc-mode, Alan Mackenzie, 2012/12/21
- Re: Scrolling huge buffers and cc-mode, Chong Yidong, 2012/12/21
Re: Scrolling huge buffers and cc-mode, Stefan Monnier, 2012/12/18