]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/treesit.c: Add comment to explain design decisions.
authorYuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>
Wed, 15 Jun 2022 19:15:24 +0000 (12:15 -0700)
committerYuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>
Thu, 16 Jun 2022 18:52:03 +0000 (11:52 -0700)
src/treesit.c

index 8d0f2e517af5b7d2403be3046d89aecf847957c7..88d5ea91223ecf23b428ff211096dede2d71e83a 100644 (file)
@@ -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