Zhongwei Yao
2017-06-27 15:01:32 UTC
Hi, all,
When I open the following file with Emacs (25.2.1) on Mac, Emacs will get
stuck for about more than 10 seconds:
http://hg.openjdk.java.net/jdk10/jdk10/hotspot/file/7a8840999420/src/share/vm/jvmci/vmStructs_jvmci.cp
And the profiler info shows cc-mode "c-backward-sws" is the hotspot. And
after check cc-mode's doc, I find font-lock-maximum-decoration to 1 will
result in much better performance. But I lose the fancy font and color in
my source file. Do you have any suggestions to solve this issue?
Thanks.
== profiler info start ==
- linum-update-current 6948 93%
- linum-update 6948 93%
- mapc 6948 93%
- linum-update-window 6948 93%
- window-end 6947 93%
- jit-lock-function 6947 93%
- jit-lock-fontify-now 6947 93%
- jit-lock--run-functions 6911 93%
- run-hook-wrapped 6911 93%
- #<compiled 0x44020c99> 6911 93%
- font-lock-fontify-region 6911 93%
- c-font-lock-fontify-region 6911 93%
- font-lock-default-fontify-region 6883 92%
- font-lock-fontify-keywords-region 6882 92%
- c-font-lock-declarations 6768 91%
- c-find-decl-spots 6768 91%
- #<compiled 0x404adfd9> 6758 91%
- c-backward-over-enum-header 6440 86%
- c-backward-typed-enum-colon 6344 85%
- c-backward-token-2 6271 84%
c-backward-sws 5732 77%
c-beginning-of-current-token 14 0%
+ c-backward-token-2 73 0%
c-on-identifier 7 0%
+ c-back-over-member-initializers 68 0%
+ c-forward-decl-or-cast-1 59 0%
+ c-forward-label 55 0%
+ c-beginning-of-decl-1 51 0%
+ c-parse-state 31 0%
c-backward-sws 20 0%
c-determine-limit 5 0%
+ c-cheap-inside-bracelist-p 5 0%
c-backward-token-2 3 0%
c-on-identifier 1 0%
+ c-forward-token-2 1 0%
+ #<compiled 0x40a9d625> 81 1%
+ c-font-lock-complex-decl-prepare 19 0%
+ c-font-lock-enclosing-decls 7 0%
+ c-font-lock-enum-tail 2 0%
#<compiled 0x40a9d4ed> 2 0%
#<compiled 0x40a9d4d1> 1 0%
+ font-lock-fontify-syntactically-region 1
0%
+ c-before-context-fl-expand-region 28 0%
#<compiled 0x412cccd5> 36 0%
== profiler info end==
--
Best regards,
Zhongwei
When I open the following file with Emacs (25.2.1) on Mac, Emacs will get
stuck for about more than 10 seconds:
http://hg.openjdk.java.net/jdk10/jdk10/hotspot/file/7a8840999420/src/share/vm/jvmci/vmStructs_jvmci.cp
And the profiler info shows cc-mode "c-backward-sws" is the hotspot. And
after check cc-mode's doc, I find font-lock-maximum-decoration to 1 will
result in much better performance. But I lose the fancy font and color in
my source file. Do you have any suggestions to solve this issue?
Thanks.
== profiler info start ==
- linum-update-current 6948 93%
- linum-update 6948 93%
- mapc 6948 93%
- linum-update-window 6948 93%
- window-end 6947 93%
- jit-lock-function 6947 93%
- jit-lock-fontify-now 6947 93%
- jit-lock--run-functions 6911 93%
- run-hook-wrapped 6911 93%
- #<compiled 0x44020c99> 6911 93%
- font-lock-fontify-region 6911 93%
- c-font-lock-fontify-region 6911 93%
- font-lock-default-fontify-region 6883 92%
- font-lock-fontify-keywords-region 6882 92%
- c-font-lock-declarations 6768 91%
- c-find-decl-spots 6768 91%
- #<compiled 0x404adfd9> 6758 91%
- c-backward-over-enum-header 6440 86%
- c-backward-typed-enum-colon 6344 85%
- c-backward-token-2 6271 84%
c-backward-sws 5732 77%
c-beginning-of-current-token 14 0%
+ c-backward-token-2 73 0%
c-on-identifier 7 0%
+ c-back-over-member-initializers 68 0%
+ c-forward-decl-or-cast-1 59 0%
+ c-forward-label 55 0%
+ c-beginning-of-decl-1 51 0%
+ c-parse-state 31 0%
c-backward-sws 20 0%
c-determine-limit 5 0%
+ c-cheap-inside-bracelist-p 5 0%
c-backward-token-2 3 0%
c-on-identifier 1 0%
+ c-forward-token-2 1 0%
+ #<compiled 0x40a9d625> 81 1%
+ c-font-lock-complex-decl-prepare 19 0%
+ c-font-lock-enclosing-decls 7 0%
+ c-font-lock-enum-tail 2 0%
#<compiled 0x40a9d4ed> 2 0%
#<compiled 0x40a9d4d1> 1 0%
+ font-lock-fontify-syntactically-region 1
0%
+ c-before-context-fl-expand-region 28 0%
#<compiled 0x412cccd5> 36 0%
== profiler info end==
--
Best regards,
Zhongwei