[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-tree-sitter and Emacs
From: |
Stefan Monnier |
Subject: |
Re: emacs-tree-sitter and Emacs |
Date: |
Thu, 02 Apr 2020 14:26:51 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> As mentioned in some other message, this design becomes inefficient when
>> you have two windows displaying a large buffer, one display near the end,
>> and the other near the beginning, and you make changes at the beginning
>> of the buffer. I haven't seen any performance bug-reports or complaints
>> about it, so it appears that those circumstances are very rare.
> Or you open a buffer and jumps to point-max,
I don't think this case is handled inefficiently by the approach taken
by `syntax-propertize`: it will take some time, yes, but it's largely
unavoidable in general (it's the same time that tree-sitter's and
CC-mode's up-front full parse have to pay for).
> OTOH if the whole buffer has been parsed, this two-window setup
> shouldn’t be slow when making changes because incremental parsing is fast,
> and we don’t need to re-parse the whole buffer.
That's supposed to be true with tree-sitter and CC-mode, but with
`syntax-propertize` we reparse everything between the first and the
second window, even though most of it was likely left untouched and
parsed identically to last time.
Stefan
- Re: emacs-tree-sitter and Emacs, (continued)
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/01
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Michael Welsh Duggan, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Michael Welsh Duggan, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Michael Welsh Duggan, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Yuan Fu, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Stefan Monnier, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Yuan Fu, 2020/04/02
- Re: emacs-tree-sitter and Emacs,
Stefan Monnier <=
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Michael Welsh Duggan, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/02
- Re: emacs-tree-sitter and Emacs, 조성빈, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Eli Zaretskii, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/03
- Re: emacs-tree-sitter and Emacs, Stefan Monnier, 2020/04/02
- Re: emacs-tree-sitter and Emacs, Stephen Leake, 2020/04/02