[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Low redisplay performance (23 regression)
From: |
Tobias C. Rittweiler |
Subject: |
Re: Low redisplay performance (23 regression) |
Date: |
Thu, 30 Apr 2009 09:34:44 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> > I'm not sure how much you can do with this information. But I can concur
> > with the OP that there does seem to be a performance regression.
>
> Indeed font-lock-fontify-keywords-region (which is the part which I'd
> expect to take the bulk of the time and would be a source of performance
> problems no matter how you implement your
> font-lock-extend-region-functions if you force refontification of the
> whole defun every time), so as I was saying
> font-lock-fontify-keywords-region got about twice as slow. And I can't
> explain it. As far as I know, this part of font-lock has not been
> changed in any significant way. What happens if you use Emacs-22's
> font-lock.el in Emacs-23?
Ok, see the profiling data below. I think I did everything the very same
as yesterday.
The first output shows the case where I linked the font-core.elc and
font-lock.elc to the .elc files of 22.1. Surprisingly that worked. :-)
You'll see that the first output shows a few less calls to END-OF-DEFUN,
and BEGINNING-OF-DEFUN(-RAW) than yesterday's data. And is a bit faster
on the whole.
The second output shows the case where I compiled the font-*.el sources
of 22.1 with a 23.x (by visiting the file, then issuing M-x
byte-compile-file.)
The second case seems to slow down everything a little bit. Although I
wouldn't vouch for the results as they're only based on 1 sample. But
has there been work on the byte-compiler?
-T.
PS.
GNU Emacs 23.0.92.1 with font-core.elc, font-lock.elc symlinked to 22.1.
jit-lock-function 478
7.9711269999 0.0166759979
jit-lock-fontify-now 478
7.9669629999 0.0166672866
font-lock-fontify-region 478
7.9076759999 0.0165432552
font-lock-default-fontify-region 478
7.8998459999 0.0165268744
font-lock-fontify-keywords-region 478
3.9014010000 0.0081619267
slime-extend-region-for-font-lock 953
3.2538709999 0.0034143452
slime-region-for-tlf-at-point 922
2.3568059999 0.0025561887
end-of-defun 1844
2.1011199999 0.0011394360
slime-region-for-extended-tlf-at-point 461
1.4019959999 0.0030412060
slime-search-suppressed-forms 922
1.2786319999 0.0013868026
font-lock-fontify-syntactically-region 478
0.6769720000 0.0014162594
beginning-of-defun-raw 4226
0.4991790000 0.0001181209
beginning-of-defun 2380
0.3932019999 0.0001652109
slime-forward-sexp 220
0.0930310000 0.0004228681
slime-forward-cruft 220
0.0895650000 0.0004071136
slime-post-command-hook 111
0.0680430000 0.0006130000
slime-eval-feature-conditional 444
0.0463489999 0.0001043896
slime-forward-reader-conditional 220
0.0386519999 0.0001756909
slime-lisp-features 444
0.0383999999 8.648...e-05
slime-forward-any-comment 220
0.0322529999 0.0001466045
font-lock-unfontify-region 478
0.0264229999 5.527...e-05
font-lock-default-unfontify-region 478
0.0187470000 3.921...e-05
slime-forward-blanks 220 0.014927
6.785e-05
slime-connection 444
0.0045750000 1.030...e-05
slime-pre-command-hook 111
0.0045430000 4.092...e-05
font-lock-extend-region-multiline 953
0.0034319999 3.601...e-06
font-lock-extend-region-wholelines 953
0.0032449999 3.405...e-06
slime-connected-p 922
0.0029949999 3.248...e-06
slime-keywordify 444
0.0027099999 6.103...e-06
font-lock-set-defaults 484
0.0015600000 3.223...e-06
jit-lock-context-fontify 9
0.0014320000 0.0001591111
slime-current-connection 444
0.0008870000 1.997...e-06
font-lock-mode 14 0.000837
5.978...e-05
font-lock-default-function 14 0.000567
4.05e-05
font-lock-mode-internal 2 0.00046
0.00023
font-lock-compile-keywords 2 0.000273
0.0001365
font-lock-turn-on-thing-lock 2
0.0001599999 7.999...e-05
jit-lock-register 2
0.0001040000 5.200...e-05
font-lock-compile-keyword 32
9.200...e-05 2.875...e-06
slime-lisp-mode-hook 1 8.9e-05
8.9e-05
slime-mode 1 7.9e-05
7.9e-05
jit-lock-mode 2 7.6e-05
3.8e-05
slime-setup-command-hooks 1 4.6e-05
4.6e-05
font-lock-add-keywords 2 4.6e-05
2.3e-05
jit-lock-refontify 2
4.200...e-05 2.100...e-05
slime-add-local-hook 2 3.4e-05
1.7e-05
font-lock-change-mode 1 2.6e-05
2.6e-05
font-lock-remove-keywords 2 2.2e-05
1.1e-05
font-lock-value-in-major-mode 5 1.2e-05
2.4e-06
font-lock-eval-keywords 2 9e-06
4.5e-06
slime-setup-first-change-hook 1 5e-06
5e-06
slime-add-easy-menu 1 4e-06
4e-06
font-lock-choose-keywords 1 4e-06
4e-06
------------------------------------------------------------------------------
GNU Emacs 23.0.92.1 with font-core.elc, font-lock.elc byte-compiled from
22.1 sources.
jit-lock-function 478
8.6693530000 0.0181367217
jit-lock-fontify-now 478
8.6651570000 0.0181279435
font-lock-fontify-region 478
8.6414769999 0.0180784037
font-lock-default-fontify-region 478
8.6329149999 0.0180604916
font-lock-fontify-keywords-region 478
4.1605249999 0.0087040271
slime-extend-region-for-font-lock 953
3.4857529999 0.0036576631
slime-region-for-tlf-at-point 922
2.5261709999 0.0027398817
end-of-defun 1844
2.2046559999 0.0011955835
slime-region-for-extended-tlf-at-point 461 1.411911
0.0030627136
slime-search-suppressed-forms 922
1.3772869999 0.0014938036
font-lock-fontify-syntactically-region 478
0.9161559999 0.0019166443
beginning-of-defun-raw 4226
0.4427990000 0.0001047796
beginning-of-defun 2380
0.4161659999 0.0001748596
slime-forward-sexp 220
0.1129909999 0.0005135954
slime-forward-cruft 220
0.1092269999 0.0004964863
slime-eval-feature-conditional 444
0.0950729999 0.0002141283
slime-forward-any-comment 220 0.086004
0.0003909272
slime-lisp-features 444
0.0853749999 0.0001922860
font-lock-unfontify-region 478
0.0296069999 6.193...e-05
font-lock-default-unfontify-region 478
0.0228370000 4.777...e-05
slime-forward-blanks 220
0.0164640000 7.483...e-05
slime-connection 444
0.0050060000 1.127...e-05
slime-pre-command-hook 106 0.004678
4.413...e-05
font-lock-extend-region-wholelines 953
0.0036529999 3.833...e-06
font-lock-extend-region-multiline 953
0.0036179999 3.796...e-06
jit-lock-context-fontify 19 0.002982
0.0001569473
slime-keywordify 444
0.0028969999 6.524...e-06
slime-connected-p 922
0.0022989999 2.493...e-06
font-lock-set-defaults 484
0.0016010000 3.307...e-06
slime-forward-reader-conditional 220
0.0010569999 4.804...e-06
font-lock-mode 17
0.0010459999 6.152...e-05
slime-current-connection 444
0.0009930000 2.236...e-06
font-lock-default-function 17 0.000617
3.629...e-05
slime-post-command-hook 106
0.0006169999 5.820...e-06
font-lock-mode-internal 2
0.0004450000 0.0002225000
font-lock-compile-keywords 2
0.0001880000 9.400...e-05
font-lock-turn-on-thing-lock 2 0.000158
7.9e-05
font-lock-change-mode 2 0.00011
5.5e-05
jit-lock-register 2 0.000102
5.1e-05
slime-lisp-mode-hook 1 9e-05
9e-05
slime-mode 1 8e-05
8e-05
jit-lock-mode 2
7.500...e-05 3.750...e-05
font-lock-compile-keyword 32
6.400...e-05 2.000...e-06
font-lock-add-keywords 2 4.8e-05
2.4e-05
slime-setup-command-hooks 1 4.7e-05
4.7e-05
jit-lock-refontify 2 4.1e-05
2.05e-05
slime-add-local-hook 2 3.4e-05
1.7e-05
font-lock-remove-keywords 2 2.2e-05
1.1e-05
font-lock-value-in-major-mode 5 1.2e-05
2.4e-06
font-lock-eval-keywords 2 9e-06
4.5e-06
slime-setup-first-change-hook 1 5e-06
5e-06
slime-add-easy-menu 1 4e-06
4e-06
font-lock-choose-keywords 1 4e-06
4e-06
Re: Low redisplay performance (23 regression), Tassilo Horn, 2009/04/29
Re: Low redisplay performance (23 regression), Chong Yidong, 2009/04/29
Re: Low redisplay performance (23 regression), YAMAMOTO Mitsuharu, 2009/04/29