emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/tree-sitter a4d7bcccba 22/26: ; * src/treesit.c: Add comment to


From: Yuan Fu
Subject: feature/tree-sitter a4d7bcccba 22/26: ; * src/treesit.c: Add comment to explain design decisions.
Date: Thu, 16 Jun 2022 14:53:53 -0400 (EDT)

branch: feature/tree-sitter
commit a4d7bcccba5ffaafb769d8f517c159d64b0887bc
Author: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>
Commit: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>

    ; * src/treesit.c: Add comment to explain design decisions.
---
 src/treesit.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/treesit.c b/src/treesit.c
index 8d0f2e517a..88d5ea9122 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -89,6 +89,14 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
    - lisp/emacs-lisp/cl-preloaded.el & data.c & lisp.h for parser and
      node type.
 
+   We don't parse at every keystroke.  Instead we only record the
+   changes at each keystroke, and only parse when requested.  It is
+   possible that lazy parsing is worse: instead of dispersed little
+   pauses, now you have less frequent but larger pauses.  I doubt
+   there will be any perceived difference, as the lazy parsing is
+   going to be pretty frequent anyway.  Also this (lazy parsing) is
+   what the mailing list guys wanted.
+
    Because it is pretty slow (comparing to other tree-sitter
    operations) for tree-sitter to parse the query and produce a query
    object, it is very wasteful to reparse the query every time



reply via email to

[Prev in Thread] Current Thread [Next in Thread]