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: Sat, 27 Mar 2021 11:03:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> "Source of a problem" is probably a bit too heavy expression :).  For
> example if I have had a file with lots of undo history, I wouldn't say
> it was a source of a problem, but I might decide that I wish to get rid
> of the undo history, and start it from clean, without killing the buffer
> and opening it a new.

I don't think I've ever seen the undo history being a source of sluggishness ;-)

>>> I used undo history as example, but I ment bunch of other stuff. No idea
>>> how much it would give in practice though.
>> So, there's no concrete existing example of stuff that could be added to
>> this "cleanup hook" :-(
> I was trying to reason in terms of a general facility. What do I know
> what people use, no idea what can be "throwable" in different modes.

The problem is that sluggishness (just like excessive memory use) can
come from many many different places.  So it's hard to come up with
a tool that handles "the usual suspects" because there are too many
usual suspects.

What we have instead is `M-x profiler-start/report` which should(?) let
you find out what is the source of the sluggishness.  Similarly we have
a `M-x memory-report` for excessive memory use.

They don't work great, admittedly, but this is a hard problem.


        Stefan




reply via email to

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