From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64735: 29.0.92; find invocations are ~15x slower because of ignores Date: Tue, 12 Sep 2023 16:11:01 +0300 Message-ID: References: <2d844a34-857d-3d59-b897-73372baac480@gutov.dev> <83bkg2tsu6.fsf@gnu.org> <83bd4246-ac41-90ec-1df3-02d0bd59ca44@gutov.dev> <834jlttv1p.fsf@gnu.org> <937c3b8e-7742-91b7-c2cf-4cadd0782f0c@gutov.dev> <83a5vlsanw.fsf@gnu.org> <69a98e2a-5816-d36b-9d04-8609291333cd@gutov.dev> <87351cs8no.fsf@localhost> <35163e56-607d-9c5b-e3e8-5d5b548b3cb7@gutov.dev> <878rb3m43b.fsf@localhost> <83v8e6lyi4.fsf@gnu.org> <35f8b664-0241-9f96-1aa0-20ca51b2d34c@gutov.dev> <59c30342-a7e0-d83b-a128-0faae4cbd633@gutov.dev> <83pm4bi6qa.fsf@gnu.org> <83bkfs2tw5.fsf@gnu.org> <18a0b4d8-32bd-3ecd-8db4-32608a1ebba7@gutov.dev> <83il8lxjcu.fsf@gnu.org> <2e21ec81-8e4f-4c02-ea15-43bd6da3daa7@gutov.dev> <8334zmtwwi.fsf@gnu.org> <83tts0rkh5.fsf@gnu.org> <14b26ff0-9d9b-3600-bf6e-133db4031622@gutov.dev> <83ledbpqmr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8313"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: luangruo@yahoo.com, sbaugh@janestreet.com, yantar92@posteo.net, 64735@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 12 16:19:39 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qg4Er-0001uj-Sv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Sep 2023 16:19:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg3BP-0005hj-79; Tue, 12 Sep 2023 09:11:59 -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 1qg3BN-0005gw-H6 for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 09:11:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg3BN-0006Ar-8R for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 09:11:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg3BR-0004Ml-S2 for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 09:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Sep 2023 13:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64735 X-GNU-PR-Package: emacs Original-Received: via spool by 64735-submit@debbugs.gnu.org id=B64735.169452427716729 (code B ref 64735); Tue, 12 Sep 2023 13:12:01 +0000 Original-Received: (at 64735) by debbugs.gnu.org; 12 Sep 2023 13:11:17 +0000 Original-Received: from localhost ([127.0.0.1]:56473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg3Ai-0004Ll-Ok for submit@debbugs.gnu.org; Tue, 12 Sep 2023 09:11:17 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg3Ah-0004LY-5Y for 64735@debbugs.gnu.org; Tue, 12 Sep 2023 09:11:16 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5C18B5C0107; Tue, 12 Sep 2023 09:11:05 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 12 Sep 2023 09:11:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1694524265; x=1694610665; bh=9qMf1VTEcKVk+StAaAG1jAFIdhxK42vLIjq czYrcMj4=; b=gXgmiyO246hmw/gVzKmY0WT8ljXdavcl+xd5cGuGlbuZE2ECUhx OLg3eHnz5b1+ozBsJwdZ0WXhsEbK+UPwLgUWFeeIGI5IVr07HaczPPdm0f6NvjU8 n7TQG5KnDhV0G4SIyKk7MmL0vCdvS1MZr1cthTUa5WjMdFFuUF7y1b2MDcFfg9+v aE0OBWHnMxsB9q6zIP3CVpWaDZD772V93ipVdl2M8CSK8Pj3Y81cqeJItg2m1S7q cGW/fRZeRcdOvorH+WWsJCCjtda6ejhVlSwx7zQKi/P5nywHO4ZtMpUBXKWYcJIK 5mECrqjN/KwZqyjkZgfV3tv48GwnnxW569A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694524265; x=1694610665; bh=9qMf1VTEcKVk+StAaAG1jAFIdhxK42vLIjq czYrcMj4=; b=moZM/cie22ToghgRysBm0c8ZUbjOO1maZ67blmN8CeUQ/M3bxTh UQ6djtLBAnB8zJTYH8VAUQDW+nDSKRcD3EaegU5i7f+5flG7AIfS6sYGWltKQMO7 FrEOnQnxE7QZYJFKc24NRCuMJU82UytplekNWjVxZ7kiAHlkHNuSXW1Tz4JvlJM9 BwAkBjZUrgghGpi/+/JrM8qxZNo6jCq0BMQrXFm+jqnnUdOfCVRhFZkfVvO5K1/9 DoplGS+wqszxY45D87B/qfPooaz1hAJdu+gHLiRDvq58Qzj8qerGmaM3v2v+LuuK lJ/qkcZFZLlB9Yga1xsjcTsRiLds741tx5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeiiedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 09:11:03 -0400 (EDT) Content-Language: en-US In-Reply-To: <83ledbpqmr.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270179 Archived-At: On 12/09/2023 14:39, Eli Zaretskii wrote: >> Date: Tue, 12 Sep 2023 02:06:50 +0300 >> Cc:luangruo@yahoo.com,sbaugh@janestreet.com,yantar92@posteo.net, >> 64735@debbugs.gnu.org >> From: Dmitry Gutov >> >>> No, we don't wait until it's zero, we perform GC on the first >>> opportunity that we_notice_ that it crossed zero. So examining how >>> negative is the value of consing_until_gc when GC is actually >>> performed could tell us whether we checked the threshold with high >>> enough frequency, and comparing these values between different runs >>> could tell us whether the shorter time spend in GC means really less >>> garbage or less frequent checks for the need to GC. >> Good point, I'm attaching the same outputs with "last value of >> consing_until_gc" added to every line. >> >> There are some pretty low values in the "read-process-output-max 409600" >> part of the experiment, which probably means runtime staying in C >> accumulating the output into the (now larger) buffer? Not sure. > No, I think this means we really miss some GC opportunities, and we > cons quite a lot more strings between GC cycles due to that. Or possibly same number of strings but longer ones? > I guess > this happens because we somehow cons many strings in code that doesn't > call maybe_gc or something. Yes, staying in some C code that doesn't call maybe_gc for a while. I think we're describing the same thing, only I was doing that from the positive side (less frequent GCs = better performance in this scenario), and you from the negative one (less frequent GCs = more chances for an OOM to happen in some related but different scenario).