[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 10:04:41 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
On 12/18/2012 11:58 PM, Stefan Monnier wrote:
about 1 minute is below. If I understand correctly, it blames
scan-sexps for most of the CPU load.
Indeed, but running scan-sexps on the whole buffer doesn't take that
long, so the problem is not that scan-sexps is slow, but that it's
called too many times.
I didn't try to profile elisp, but here is what I'm seeing at the lower level.
Since the percentage of exec_byte_code is just 1.21%, I suspect that elisp
is not a bottleneck here. Looking at enormous percentage of lookup_char_property
and next_interval, I would rather suspect an issue with interval trees.
Dmitry
# ========
# captured on: Tue Dec 18 19:30:31 2012
# hostname : localhost.localdomain
# os release : 3.6.10-2.fc17.x86_64
# perf version : 3.6.10-2.fc17.x86_64
# arch : x86_64
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
# cpuid : GenuineIntel,6,42,7
# total memory : 3930292 kB
# cmdline : /usr/bin/perf record -e stalled-cycles-frontend -e
stalled-cycles-backend -F 10000 ./src/emacs -Q ../../misc/huge.cc
# event : name = stalled-cycles-frontend, type = 0, config = 0x7, config1 =
0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host
# event : name = stalled-cycles-backend, type = 0, config = 0x8, config1 = 0x0,
config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# ========
#
# Samples: 3M of event 'stalled-cycles-frontend'
# Event count (approx.): 284964331659
#
# Overhead Command Shared Object
Symbol
# ........ ........... .............................
......................................................
#
22.65% emacs emacs [.] lookup_char_property
21.21% emacs emacs [.] scan_sexps_forward
17.65% emacs emacs [.] next_interval
8.29% emacs emacs [.] Fcdr
4.66% emacs emacs [.] update_syntax_table
2.15% emacs emacs [.] scan_lists
1.95% emacs emacs [.] mark_object
1.92% emacs emacs [.] update_interval
1.74% emacs emacs [.] Fassq
1.41% emacs emacs [.] back_comment
1.38% emacs emacs [.] forw_comment
1.21% emacs emacs [.] exec_byte_code
1.08% emacs emacs [.] char_quoted
1.05% emacs emacs [.] re_match_2_internal
0.70% emacs emacs [.] re_compile_pattern
0.67% emacs emacs [.] Fgarbage_collect
0.58% emacs emacs [.] find_interval
- 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