summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-09-13 17:56:07 -0700
committerYuan Fu <casouri@gmail.com>2023-09-13 18:15:28 -0700
commitc916f471caada4eb9a4b7f9f53925a71525c694a (patch)
tree1f7c54b12a432a8466195ebf11f0d12ad1f70e64 /admin
parentad624b961b84c9f68a9bdda4aa63daf91d46abb9 (diff)
downloademacs-c916f471caada4eb9a4b7f9f53925a71525c694a.tar.gz
Add tree-sitter performance note
Diffstat (limited to 'admin')
-rw-r--r--admin/notes/tree-sitter/performance12
1 files changed, 12 insertions, 0 deletions
diff --git a/admin/notes/tree-sitter/performance b/admin/notes/tree-sitter/performance
new file mode 100644
index 00000000000..0e8351403af
--- /dev/null
+++ b/admin/notes/tree-sitter/performance
@@ -0,0 +1,12 @@
+TREE-SITTER PERFORMANCE NOTES -*- org -*-
+
+* Facts
+
+Incremental parsing of a few characters worth of edit usually takes
+less than 0.1ms. If it takes longer than that, something is wrong. There’s one time where I found tree-sitter-c takes ~30ms to incremental parse. Updating to the latest version of tree-sitter-c solves it, so I didn’t investigate further.
+
+The ranges set for a parser doesn’t grow when you insert text into a
+range, so you have to update the ranges every time before
+parsing. Fortunately, changing ranges doesn’t invalidate incremental
+parsing, so there isn’t any performance lost in update ranges
+frequently.