GNU bug report logs -
#60691
29.0.60; Slow tree-sitter font-lock in ruby-ts-mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Mon, 9 Jan 2023 17:36:02 UTC
Severity: normal
Found in version 29.0.60
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>> Is it common to try to highlight 1000 or even 100 files in one diff?
>> 100 is rare, but tens is pretty common, so this problem affects
>> only this specific case.
>
> So it's a 0,8-3s delay in those cases? That's not ideal.
The delay is noticeable, alas.
>> I noticed that while most library files are small, e.g.
>> libtree-sitter-c.so is 401,528 bytes,
>> libtree-sitter-ruby.so is 2,130,616 bytes
>> that means that it has more complex logic
>> that might explain its performance.
>
> ruby is indeed one of the larger ones. Among the ones I have here compiled,
> it's exceeded only by cpp. 2.29 MB vs 2.12 MB.
The winner is libtree-sitter-julia.so with 7.25 MB.
But regarding libtree-sitter-cpp.so I confirm it's 2.3 MB.
And c++-ts-mode is even faster than c-ts-mode.
On the same admin/alloc-colors.c:
c-mode
(33.378821569 1500 17.632000617)
c-ts-mode
(2.1949608069999997 34 0.4119784769999981)
c++-ts-mode
(2.0979403910000003 34 0.39749122499999956)
So size doesn't matter.
This bug report was last modified 2 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.