GNU bug report logs - #60653
30.0.50; tree-sitter: `treesit-[explore/inspect]-mode' can leak memory

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Sun, 8 Jan 2023 10:46:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #8 received at 60653 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Mickey Petersen <mickey <at> masteringemacs.org>
Cc: 60653 <at> debbugs.gnu.org
Subject: Re: bug#60653: 30.0.50; tree-sitter: 
 `treesit-[explore/inspect]-mode' can leak memory
Date: Sun, 8 Jan 2023 19:38:49 -0800
Mickey Petersen <mickey <at> masteringemacs.org> writes:

> If you enable either the `treesit-inspect-mode' or
> `treesit-explore-mode' and leave them to their devices, you may find
> that through excessive editing, particularly programmatically, that it
> can cause memory leaks over time.
>
> I am 90% certain those modes are responsible: if I do not use them,
> then I do not experience these issues. I have had the oomkiller reap
> the Emacs process as it simply balloons out of control over time.

Hmmm, maybe it’s just using a lot of memory. Emacs never returns memory
once it allocates them. Are you opening a lot of buffers? A tree-sitter
parse tree uses about 10x memory as the source text.

Yuan




This bug report was last modified 2 years and 153 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.