unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Memory usage report
Date: Fri, 18 Sep 2020 14:42:16 +0300	[thread overview]
Message-ID: <83r1qz48h3.fsf@gnu.org> (raw)
In-Reply-To: <871rizl5mf.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri,  18 Sep 2020 12:51:52 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 18 Sep 2020 12:51:52 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Not that I'd object to formatting this in better ways (especially
> > since a package to do that is already on ELPA), but from experience,
> > memory related problems are very rarely in GC-related areas.  So for
> > diagnosing memory leaks, the GC report is not very useful.
> 
> Even in the presence of a C-level genuine leak, it's useful -- because
> it shows you that the memory is indeed not taken by Lisp-level objects.

Yes, but that's a negative evidence, so it doesn't give any hints
regarding where to look for the problem.

> But for this command to be useful in general, I think we'll have to
> expose more data from the C layer.  What caches and stuff do we have on
> the C layer that can take a significant amount of memory?  The image
> and font caches?  Uhm...  Anything more?

We have a legion of them.

The problem with reporting that memory is that we'd need to monitor
calls that free memory as well, and "forget" the chunks that have been
freed.  At which point we will probably realize that there are
memory-debugging libraries out there, and it's probably easier to
build Emacs with one of them instead of rolling out our own.

> I'd also like the display to list, say, the ten "largest variables".

Which variables did you have in mind in this context?  Can you show an
example?

> And I'd also like to do the same with buffer-local variables, in
> case a lot of data is hiding there (for instance, the eww-history,
> which caches old rendered versions of web pages, and may be large).

But those are part of the GC report, aren't they?



  reply	other threads:[~2020-09-18 11:42 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 19:09 Memory usage report Lars Ingebrigtsen
2020-09-17 19:19 ` Eli Zaretskii
2020-09-17 19:28   ` Lars Ingebrigtsen
2020-09-18  6:25     ` Eli Zaretskii
2020-09-18 10:51       ` Lars Ingebrigtsen
2020-09-18 11:42         ` Eli Zaretskii [this message]
2020-09-18 11:47           ` Lars Ingebrigtsen
2020-09-18 12:40             ` Eli Zaretskii
2020-09-18 12:59               ` Lars Ingebrigtsen
2020-09-18 13:17                 ` Eli Zaretskii
2020-09-18 13:32                   ` Ihor Radchenko
2020-09-18 14:00                     ` Eli Zaretskii
2020-09-18 14:08                       ` Lars Ingebrigtsen
2020-09-18 15:15                         ` Stefan Monnier
2020-09-18 15:19                           ` Lars Ingebrigtsen
2020-09-18 15:44                             ` Eli Zaretskii
2020-09-19 14:27                               ` Lars Ingebrigtsen
2020-09-19 14:48                                 ` Eli Zaretskii
2020-09-18 15:27                         ` Eli Zaretskii
2020-09-18 14:30                       ` Ihor Radchenko
2020-09-18 15:33                         ` Eli Zaretskii
2020-09-18 15:37                           ` Lars Ingebrigtsen
2020-09-18 15:50                             ` Eli Zaretskii
2020-09-19 14:23                               ` Lars Ingebrigtsen
2020-09-18 16:14                           ` Ihor Radchenko
2020-09-18 19:15                             ` Eli Zaretskii
2020-09-19  0:29                               ` Ihor Radchenko
2020-09-19  7:51                                 ` Eli Zaretskii
2020-09-19 14:29                                   ` Lars Ingebrigtsen
2020-09-19 14:46                                     ` Eli Zaretskii
2020-09-19 14:54                                       ` Lars Ingebrigtsen
2020-09-19 15:34                                         ` Eli Zaretskii
2020-09-19 15:40                                     ` Stefan Monnier
2020-09-20  9:10                                       ` Lars Ingebrigtsen
2020-09-19 14:34                                   ` Ihor Radchenko
2020-09-19 14:53                                     ` Eli Zaretskii
2020-09-19 15:14                                       ` Ihor Radchenko
2020-09-19 15:36                                         ` Eli Zaretskii
2020-09-19 15:45                                           ` Ihor Radchenko
2020-09-19 16:05                                             ` Eli Zaretskii
2020-09-19 15:43                                     ` Stefan Monnier
2020-09-19 16:08                                       ` Ihor Radchenko
2020-09-19 16:18                                         ` Stefan Monnier
2020-09-17 19:45 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r1qz48h3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).