[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
- feature/tree-sitter c5b172ec58 03/26: * configure.ac (HAVE_TREE_SITTER): Not set TREE_SITTER_LIBS., (continued)
- feature/tree-sitter c5b172ec58 03/26: * configure.ac (HAVE_TREE_SITTER): Not set TREE_SITTER_LIBS., Yuan Fu, 2022/06/16
- feature/tree-sitter bd1b27b7c7 23/26: ; Minor optimization in treesit range function, Yuan Fu, 2022/06/16
- feature/tree-sitter 33f7e10a29 26/26: Add treesit test for previous change, Yuan Fu, 2022/06/16
- feature/tree-sitter 184d212042 16/26: Merge branch 'feature/tree-sitter-depth-control' into feature/tree-sitter, Yuan Fu, 2022/06/16
- feature/tree-sitter b162faba0b 18/26: Fix compile warnings and errors in treesit.c, Yuan Fu, 2022/06/16
- feature/tree-sitter d729e3e3fc 19/26: * src/treesit.c (ts_check_range_argument): Check for point-min/max., Yuan Fu, 2022/06/16
- feature/tree-sitter 98bfb24081 17/26: Merge remote-tracking branch 'savannah/master' into feature/tree-sitter, Yuan Fu, 2022/06/16
- feature/tree-sitter 7cee82a91d 24/26: Fix treesit function ts_record_change and friends, Yuan Fu, 2022/06/16
- feature/tree-sitter d6b00f7ed9 20/26: ; * src/treesit.c (ts_read_buffer): Clarify comments., Yuan Fu, 2022/06/16
- feature/tree-sitter dd65d1c396 25/26: Consolidate treesit parser create functions, Yuan Fu, 2022/06/16
- feature/tree-sitter a4d7bcccba 22/26: ; * src/treesit.c: Add comment to explain design decisions.,
Yuan Fu <=