From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Memory usage report Date: Sat, 19 Sep 2020 18:36:17 +0300 Message-ID: <83a6xl3hji.fsf@gnu.org> References: <87lfh8kyot.fsf@gnus.org> <83k0ws5hzt.fsf@gnu.org> <87h7rwkxtk.fsf@gnus.org> <83imcb61p7.fsf@gnu.org> <871rizl5mf.fsf@gnus.org> <83r1qz48h3.fsf@gnu.org> <871rizjogr.fsf@gnus.org> <83pn6j45rr.fsf@gnu.org> <87wo0ri6kz.fsf@gnus.org> <83o8m34433.fsf@gnu.org> <87imcb43e3.fsf@localhost> <83k0wr4222.fsf@gnu.org> <87ft7f40p8.fsf@localhost> <83h7rv3xsc.fsf@gnu.org> <87wo0rdpud.fsf@localhost> <838sd6522b.fsf@gnu.org> <87tuvuehhq.fsf@localhost> <83wo0q2ohm.fsf@gnu.org> <87mu1lesy3.fsf@localhost> <83d02h3jj2.fsf@gnu.org> <87k0wper2r.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 19 17:43:58 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJf1q-00053p-Pa for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 17:43:58 +0200 Original-Received: from localhost ([::1]:53286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJf1p-0000EB-P0 for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Sep 2020 11:43:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJeuT-0000Kq-4F for emacs-devel@gnu.org; Sat, 19 Sep 2020 11:36:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46519) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJeuS-0004GT-Pu; Sat, 19 Sep 2020 11:36:20 -0400 Original-Received: from [176.228.60.248] (port=2435 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kJeuS-00037k-0u; Sat, 19 Sep 2020 11:36:20 -0400 In-Reply-To: <87k0wper2r.fsf@localhost> (message from Ihor Radchenko on Sat, 19 Sep 2020 23:14:52 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256184 Archived-At: > From: Ihor Radchenko > Cc: larsi@gnus.org, emacs-devel@gnu.org > Date: Sat, 19 Sep 2020 23:14:52 +0800 > > > I think the more useful question is: are all those overlays and text > > properties necessary? If they are, they take the memory they are > > supposed to take. > > Some of the overlays and text properties are not strictly necessary. > For example, text properties are sometimes used as cache to avoid > parsing text multiple times. Is the resulting speedup worth extra memory > usage? It is not clear since we do not have an easy way to determine the > extra memory usage. These are exactly the questions to ask the Org developers, I think. > > If you mean memory used by non-Lisp objects, I don't see how we could > > produce that without having infrastructure for tracking memory > > allocation, something that debugging malloc libraries already do. > > Hmm. I am looking again at the profiler-report output. It seems to > report the memory allocation for individual function calls (that's what > I meant by "real" memory profiler). Do I miss something? What that profiler counts is calls to memory-allocation functions, that's all. Without being able to account for memory which was freed after being allocated, these counts are useless.