[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration on feature/tree-sitter
From: |
Eli Zaretskii |
Subject: |
Re: Tree-sitter integration on feature/tree-sitter |
Date: |
Fri, 13 May 2022 13:37:05 +0300 |
> From: Theodor Thornhill <theo@thornhill.no>
> Cc: casouri@gmail.com, emacs-devel@gnu.org
> Date: Fri, 13 May 2022 10:04:03 +0200
>
> > Is it true that there's just one query for each PL mode, and it is
> > fixed (doesn't change) and doesn't depend on the buffer contents in
> > any way? If that is true, the major mode could compile the query
> > whenever it is initialized, and then reuse it in every buffer that is
> > under that major mode.
> >
>
> Yes, for indentation and font locking, this is correct. I'd think that
> it'll be enough to compile on mode init, and just reuse it. For some
> hypothetical other uses, such as searching and replacing, we would need
> to be more dynamic, but that won't have the performance issues that font
> locking typically has.
Right.
> Why not use the same idea as the `eglot-managed-mode`, where if the
> file fulfills some predicate, we choose to treat them all as equals.
> Thus we only need to compile/read/use the queries once, and can
> simply lookup what we need.
We can do something like that if needed. But I don't necessarily see
the need yet. When will we need this, if a major mode compiles the
query once when it is first turned on in some buffer?
> > There isn't any (IIUC what you are asking). Fontification is a
> > feature of interactive sessions, and is basically meaningless without
> > normal redisplay.
> >
>
> An ok benchmark would be using C-n rather than C-v, because that seems
> to trigger more performance issues in my daily use.
We should benchmark both, because both are important.
- Re: Tree-sitter integration on feature/tree-sitter, (continued)
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Stefan Monnier, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/12
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter,
Eli Zaretskii <=
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Yoav Marco, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/13
- Re: Tree-sitter integration on feature/tree-sitter, chad, 2022/05/15
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/15
Re: Tree-sitter integration on feature/tree-sitter, Kiong-Ge Liau, 2022/05/19
Re: Tree-sitter integration on feature/tree-sitter, Kiong-Ge Liau, 2022/05/19