help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug memory leaks


From: Stefan Monnier
Subject: Re: How to debug memory leaks
Date: Fri, 26 Mar 2021 12:25:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> No, no, I don't mean that some modes don't need undo. I mean, if I am
> working in a buffer, say some C file, and I think Emacs get sluggish, I
> could do some M-x clean-buffer and have it setq bunch of variables to
> nil, amongst them undo so GC can collect them. It is just that these
> variables might be different depending of type of buffer, active modes
> etc.

I suspect that it would be "ineffective by design": in order to realize
that such-and-such setting might solve a performance problem, you'll
generally need first to be aware of that performance problem, and
usually once you're aware of it you can just fix the problem itself.

E.g. I don't think flushing buffer-undo-list will ever help
with sluggishness.

> Ok, I didn't know I can use post-command-hook for that. I'll try and
> play with it. Thanks.

Note also that if you want to make Emacs sluggish, a good place to start
is by adding stuff to post-command-hook ;-)


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]