[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59738: c-ts-mode is slow with large buffers.
From: |
Eli Zaretskii |
Subject: |
bug#59738: c-ts-mode is slow with large buffers. |
Date: |
Wed, 07 Dec 2022 19:23:38 +0200 |
> Cc: 59738@debbugs.gnu.org
> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 6 Dec 2022 20:56:13 -0800
>
>
> Alan Mackenzie <acm@muc.de> writes:
>
> > Hello, Emacs.
> >
> > In an up to date (2022-11-30) master started as $ emacs --no-desktop:
> >
> > The file .../drivers/gpu/drm/amd/include/asic_reg/dce/dce_12_0_sh_mask.h
> > in the Linux source tree is 6.8 MB big, consisting of a large number of
> > #defines and comments, but nothing else.
> >
> > To scroll through it in c-ts-mode takes a little over 26 minutes on my
> > system. By comparison, in C Mode it takes 31 seconds. There would
> > appear to be a need for some optimisation in c-ts-mode, here.
> >[...]
> Ah, the lovely packet-rrc.c file.
No, this is a different file, dce_12_0_sh_mask.h. It is a header file
which only has preprocessor #define lines. I'm puzzled why this
presents such a great difficulty for tree-sitter. Could you take a
look what happens with that file?
> We had some discussion of it in
> bug#59415, basically it contains some syntax that screws tree-sitter up.
> The block initialization you see makes tree-sitter into erroneously
> generating a very tall tree: it recognizes all the opening bracket and
> ignores (almost) all the closing brackets. That causes operations on the
> tree to be much much slower than it normally is.
Right, but with a long series of #define lines there should be no
parse tree at all...
- bug#59738: c-ts-mode is slow with large buffers., Alan Mackenzie, 2022/12/01
- bug#59738: c-ts-mode is slow with large buffers., Yuan Fu, 2022/12/03
- bug#59738: c-ts-mode is slow with large buffers., Yuan Fu, 2022/12/06
- bug#59738: c-ts-mode is slow with large buffers.,
Eli Zaretskii <=
- bug#59738: c-ts-mode is slow with large buffers., Yuan Fu, 2022/12/07
- bug#59738: c-ts-mode is slow with large buffers., Eli Zaretskii, 2022/12/08
- bug#59738: c-ts-mode is slow with large buffers., Alan Mackenzie, 2022/12/10
- bug#59738: c-ts-mode is slow with large buffers., Yuan Fu, 2022/12/10
- bug#59738: c-ts-mode is slow with large buffers., Eli Zaretskii, 2022/12/11
- bug#59738: c-ts-mode is slow with large buffers., Alan Mackenzie, 2022/12/11
- bug#59738: c-ts-mode is slow with large buffers., Dmitry Gutov, 2022/12/11
- bug#59738: c-ts-mode is slow with large buffers., Eli Zaretskii, 2022/12/11
- bug#59738: c-ts-mode is slow with large buffers., Alan Mackenzie, 2022/12/11
- bug#59738: c-ts-mode is slow with large buffers., Eli Zaretskii, 2022/12/11