summaryrefslogtreecommitdiff
path: root/test/lisp/vc/vc-git-tests.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-11-21 10:52:55 -0800
committerYuan Fu <casouri@gmail.com>2022-11-21 10:52:55 -0800
commit0cbb7d3bd098e80b58457cb58125cc67e56415a2 (patch)
tree8d8cc54c4cf461b49cf3a42c29a4caca5a23c2d4 /test/lisp/vc/vc-git-tests.el
parentaa6958c04e6912f0fe58e658c91459db8f86b08a (diff)
downloademacs-0cbb7d3bd098e80b58457cb58125cc67e56415a2.tar.gz
emacs-0cbb7d3bd098e80b58457cb58125cc67e56415a2.tar.bz2
emacs-0cbb7d3bd098e80b58457cb58125cc67e56415a2.zip
Further tweak tree-sitter fontification heuristics
So it turns out the slowness observed in bug#59415 is not due to the size, but the strangely tall tree. Adjust the heuristic to DTRT: don't enable the heuristic by default or when buffer is large, enable when query is abnormally slow. We could do some clever thing that calibrates a base reading for the query time instead of using a hard-coded value, but it doesn't seem necessary. * lisp/treesit.el (treesit--font-lock-fast-mode): New variable. (treesit-font-lock-fontify-region): Don't activate heuristic by default (reasons in comments). Measure the query time and activate the fast mode if query time is long.
Diffstat (limited to 'test/lisp/vc/vc-git-tests.el')
0 files changed, 0 insertions, 0 deletions