From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jose A Ortega Ruiz Newsgroups: gmane.emacs.devel Subject: Re: Memory problems update Date: Fri, 23 Sep 2022 22:57:41 +0100 Message-ID: <878rm9u52i.fsf@mail.jao.io> References: <87v8pz18wf.fsf@mail.jao.io> <83o7vrgimc.fsf@gnu.org> <87wnafdnee.fsf@logand.com> <835yhzgdyi.fsf@gnu.org> <87k06den1s.fsf@logand.com> <87illxy5ir.fsf@mail.jao.io> <87sfl1d1wi.fsf@logand.com> <87czc5y1wp.fsf@mail.jao.io> <871qsl8gt4.fsf@yahoo.com> <87v8pfwc1z.fsf@mail.jao.io> <87zgerc4rh.fsf@yahoo.com> <87sfkix5cr.fsf@mail.jao.io> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32612"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 00:28:27 2022 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 1obr9m-0008Ko-LP for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 00:28:26 +0200 Original-Received: from localhost ([::1]:35520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obr9l-0006KK-CD for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Sep 2022 18:28:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqg5-0008P6-GX for emacs-devel@gnu.org; Fri, 23 Sep 2022 17:57:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqg5-0008WJ-7r; Fri, 23 Sep 2022 17:57:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=H+QAW+/BxS1NWCu+mgSY12rKSGaXcmrcUnu8i6B+pIE=; b=WKcPJlJD8KXQTOTNpnBz Bfsx3RyC2WgF148ps1En5nKOF6kV1zsxWfZtphHypxWSDsiEwrbWEhzO0HjORYWNcZojzNkv/TeUD xrqD4fHp1eONraE2CwOh2gQqCQIRUYnIDVuhc+EwCDuuSUVjFmxPubjE4tJnF8+pHLa4QsY6MeEh+ s5UyD4+LMOIxvQgnUD3cQSE/dKXdcuV2Cjrza1Acpn5o0K4S5Kd3p1MgvBrA5pT4On3fJwNkK9d83 na85Akms4lMkFSIhkeK9NMTdvjXm2Eo7BCf4HKQpPJuncWaUkO1YxJasXOU3ucGWdL1dwRcdPlUMS rHVt8CCzgNDC6Q==; Original-Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:44134 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqg4-0007Kh-4y; Fri, 23 Sep 2022 17:57:45 -0400 Original-Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id c1b1b310; Fri, 23 Sep 2022 21:57:41 +0000 (UTC) In-Reply-To: <87sfkix5cr.fsf@mail.jao.io> X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:296098 Archived-At: On Fri, Sep 23 2022, Jose A Ortega Ruiz wrote: > On Fri, Sep 23 2022, Po Lu wrote: > > [...] > >>> Unfortunately, the situation with the pgtk build has not improved at >>> all. I actually think it's gone worse since i last tried: a pgtk emacs >>> running in wayland (i've tried with sway and river) goes up to a 2Gb >>> footprint in just a couple hours of use (and shows no sign of stopping). >>> So there i stick to tty emacs in kitty or foot (BTW, i think the bug fix >>> you mention above also affected tty emacs, because it's also consuming >>> around 25% less memory than it used to). >> >> That's quite odd, but I suspect a memory fragmentation issue if you have >> lots of frames (or child frames) and frequently resize them. > > Turns out i almost never open more than one frame in graphic mode (i use > window configurations to switcht between "workspaces", saved from > registers, and the only emacs frame is typically maximized in a tiling > compositor) [1]. > >> What if you turn off all packages that utilize child frames? > > I don't think i use any child frame either, with the exception of > corfu's. I'll try with company instead (or with old good standard > completion) and report back. Corfu seems indeed to be the cause of the leaks: they go away without it, and memory seems to stabilise in pgtk/wayland around the same mark as in X11 (at least for the first day of continuous usage). I've tried to reproduce the problem in an emacs -Q just creating child frames and deleting them in a loop, but that's not enough: i guess one of the reasons is that such a loop fails to introduce fragmentation, and another might be that corfu uses its child frames as pop-ups (for completion candidates), and there's quite a bit of additional set up for them, including several "XXX Hack" comments that might point to non-standard uses of the API (the package is in gnu elpa, in case you are curious). Seems more of an issue for corfu's bug tracker than emacs's, but let me know if you think otherwise. Many thanks for your advice, it's a big relief to have back a well behaved emacs! Cheers, jao -- I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived. -Henry David Thoreau, naturalist and author (1817-1862)