summaryrefslogtreecommitdiff
path: root/doc/emacs/files.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/emacs/files.texi')
-rw-r--r--doc/emacs/files.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 6d666831612..c0e702da947 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -215,6 +215,17 @@ by the integers that Emacs can represent (@pxref{Buffers}). If you
try, Emacs displays an error message saying that the maximum buffer
size has been exceeded.
+@vindex treesit-max-buffer-size
+ If you try to visit a file whose major mode (@pxref{Major Modes})
+uses the tree-sitter parsing library, Emacs will display a warning if
+the file's size in bytes is larger than the value of the variable
+@code{treesit-max-buffer-size}. The default value is 40 megabytes for
+64-bit Emacs and 15 megabytes for 32-bit Emacs. This avoids the
+danger of having Emacs run out of memory by preventing the activation
+of major modes based on tree-sitter in such large buffers, because a
+typical tree-sitter parser needs about 10 times as much memory as the
+text it parses.
+
@cindex wildcard characters in file names
@vindex find-file-wildcards
If the file name you specify contains shell-style wildcard