From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Sat, 06 Jul 2024 12:23:14 +0000 Message-ID: References: <878qyf4sgm.fsf@gmail.com> <878qye3l81.fsf@gmail.com> <86a5iu4tiy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , eller.helmut@gmail.com, emacs-devel@gnu.org To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 14:31:54 2024 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 1sQ4a2-0007oZ-Dk for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 14:31:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ4ZH-0002r7-T6; Sat, 06 Jul 2024 08:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQ4Rq-0000JH-Jq for emacs-devel@gnu.org; Sat, 06 Jul 2024 08:23:26 -0400 Original-Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQ4Rl-0000q3-AG; Sat, 06 Jul 2024 08:23:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720268597; x=1720527797; bh=OiSMIlvf0aqF4YuTXEqBtxcExusgOp1NAM94Um3Pg2w=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=EQeWWETF/MM+vDq9GVZq3Y74gTi7WKKkGCj+5oS3HiSZ1SI3//kxZ9n5OZqCT51Nd kkREr2D8VBtWDyn3EHwWwNQgOjAT/u4sv360UH2yOPULS9yhkXsWlOOwZyPijQgH0l 8cYAVw65ZvobgLgU2W50iiOQaXOTYBOq+jmw0YQldy5WumTiojpt18V5YoC1o3eO5v QREQykoOCnmf/spD+yvX2yLIYbJfbzWdN9SKtAuos3niTeExrPOqZX4KYahIOcC2Qt A/sR9gxuLVFhc7UeSM4wm2FHhnUIWad5hifujo6wmo8PVr2+F5If1i1Wui6+eADkHK k+WPD+PtsBPgQ== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: b4753d4b4e51f3e2f653ba9296d26b35e24bef21 Received-SPF: pass client-ip=185.70.40.133; envelope-from=pipcet@protonmail.com; helo=mail-40133.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 06 Jul 2024 08:31:05 -0400 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321430 Archived-At: On Saturday, July 6th, 2024 at 12:16, Gerd M=C3=B6llmann wrote: > Eli Zaretskii eliz@gnu.org writes: >=20 > > > Which poses the question where can we put that igc_process_messages, = so > > > that it doesn't get too expensive (if it is), but is regularly enough > > > called even if not idle. > > >=20 > > > Maybe_quit, maybe_gc, specbind? Any other ideas? > >=20 > > maybe_gc, I'd say. But the conditions for actually calling GC will > > have to change, of course. >=20 >=20 > Or another idea: >=20 > We allocate bignums in igc. Every N bignum allocations, take some time to > process messages and thus finalize them. I have no idea what a good N > would be thpugh. We could try with 1000 and 0.1s, maybe. >=20 > This also assumes that only bignums are allocated frequently plus must > be finalized. Don't know if that's true. I'd say maybe_garbage_collect (with suitable logic in maybe_gc to call it o= nce in a while; but this is the fallback so calling it rarely is okay) plus= maybe_finalize (calling it once per 1 MB of allocated finalizable objects = would be what I'd try first, though that number may be low) plus the idle l= oop. That should catch all cases, I think :-)