GNU bug report logs -
#59415
29.0.50; [feature/tree-sitter] c-ts-mode fails to fontify a portion of a large C file
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sun, 20 Nov 2022 17:56:02 UTC
Severity: normal
Found in version 29.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>
>> I appreciate the explanation. I think getting the root is a bit
>> excessive. I got the same results as you in the capture. Maybe reuse
>> the treesit-defun-type-regexp, and default to root if none found?
>
> I tried the "top-level node” approach, and it didn’t help in
> package-rrc.c: the top-level node (a function definition) is still too
> large (spans 7680306-9936062). Since the case I described in the
> comment against using treesit-node-on is the exception rather than the
> norm, maybe we can go the other way around: use treesit-node-on first,
> and if the node seems too small (by some heuristic), enlarge it to
> some degree.
>
Makes sense!
BTW, should the chunk-size of jit-lock be up for discussion again? I
ran the benchmarks from this thread [0] on this file, and it seems like
increasing the chunk-size from 1500 to 4500 by 500 increments makes it
average from 2 seconds to 1.65.
The density of that file absolutely is a concern performance-wise.
Theo
[0]: https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00538.html
This bug report was last modified 2 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.