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 17:26:26 +0300 Message-ID: References: <83sf9eub9d.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------pNrGtcmBObRwwOXzSA0eJQDE" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9572"; 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:27:14 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 1qg4MD-0002DI-3g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Sep 2023 16:27:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg4Ly-0001UH-Eg; Tue, 12 Sep 2023 10:26:58 -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 1qg4Lx-0001U1-IB for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 10:26: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 1qg4Lx-0006Er-9X for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 10:26:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qg4M1-0007Pj-UP for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 10:27: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 14:27: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.169452880128470 (code B ref 64735); Tue, 12 Sep 2023 14:27:01 +0000 Original-Received: (at 64735) by debbugs.gnu.org; 12 Sep 2023 14:26:41 +0000 Original-Received: from localhost ([127.0.0.1]:59719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg4Lg-0007P7-Hx for submit@debbugs.gnu.org; Tue, 12 Sep 2023 10:26:41 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qg4Lf-0007Ot-11 for 64735@debbugs.gnu.org; Tue, 12 Sep 2023 10:26:39 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 34AD95C0145; Tue, 12 Sep 2023 10:26:29 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 12 Sep 2023 10:26:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc: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=1694528789; x=1694615189; bh=kb nA+MxBx0YBIlUbx+xdq3+WRUhtmwdEJkf0eiGO1I8=; b=mirJCNK2fVrZnIxqbh CSDZExhedn3+0Lcre+qEbWbjO7sbM3L6FR4/CJV1W89DrRaO5EzlzcrheVWXQBEp KlZ7aA1lTpSB+qfdOIOJqGWq5nACoubDehzwlE+hpjaqKwHSGEgAZe2JAIf3lnrr BplNRC2Vv0w/GTJpyG08GGcZFToHa6wXTf9UqGfxCoJsDVPHgg3qUzd9wjswLgTm 7TaGcKE4C3RgDchBSvc1evseTCi6Ma77CWRAetif5GP94QVQ5uWWwdt91LALL/0T N5rnd+YiecqgInm9VzHlb0OmcuGTxzBRXoeacZekUGz/IVw5ujV7d6Z23NHK8MGs FVEg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1694528789; x=1694615189; bh=kbnA+MxBx0YBI lUbx+xdq3+WRUhtmwdEJkf0eiGO1I8=; b=TSx/Spgn5YVuc1tAaugnwsWK5yioH knRCDDp6gmfrog8/qAlk3HG66SSJPDtqcR6IO75GjbjwgFcEmt6p+mn/hJWL7QYS 643bPw2bejp+EkMndE2A2xQxnqPjFqvYXd7QNhK8FBxzAyuf/MlueAd+h9BIphsZ 3RvWMTqOXxgTX80uBKE/cIMykijgneOM/sTFZB0pm780FppbJQGwurOd6M7pys29 zXIXbUGBCP0ea9d8AdZa4xUY1n1WZkcub//dtwtTyJZ1q/kdp+z5dZB7NDSHggWU fi4HH0NvGKFDRZ52sxAyHmOoHue84GG5mbwfOi2LRs0TZ6vdvW/1IgprQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeiiedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuhffvvehfjgesmhdtreertdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeiheegkeetgffghefhgeeiveeuudegvdeuteffhfettdelleehkeffledvuddt leenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 10:26:27 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:270184 Archived-At: This is a multi-part message in MIME format. --------------pNrGtcmBObRwwOXzSA0eJQDE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/09/2023 17:23, Dmitry Gutov wrote: > Neither are intended as complete proposals, but here are some > comparisons. Note that either of these patches could only help the > implementations that don't set up process filter (the naive first one, > and the new parallel number 5 above). Sorry, forgot to attach the patches. --------------pNrGtcmBObRwwOXzSA0eJQDE Content-Type: text/x-patch; charset=UTF-8; name="call_filter_directly.diff" Content-Disposition: attachment; filename="call_filter_directly.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IDA4Y2I4 MTBlYzEzLi5iZGJlOGQ5NjA2NCAxMDA2NDQKLS0tIGEvc3JjL3Byb2Nlc3MuYworKysgYi9z cmMvcHJvY2Vzcy5jCkBAIC02MjI3LDcgKzYyMjcsMTUgQEAgcmVhZF9wcm9jZXNzX291dHB1 dCAoTGlzcF9PYmplY3QgcHJvYywgaW50IGNoYW5uZWwpCiAgICAgIGZyaWVuZHMgZG9uJ3Qg ZXhwZWN0IGN1cnJlbnQtYnVmZmVyIHRvIGJlIGNoYW5nZWQgZnJvbSB1bmRlciB0aGVtLiAg Ki8KICAgcmVjb3JkX3Vud2luZF9jdXJyZW50X2J1ZmZlciAoKTsKIAotICByZWFkX2FuZF9k aXNwb3NlX29mX3Byb2Nlc3Nfb3V0cHV0IChwLCBjaGFycywgbmJ5dGVzLCBjb2RpbmcpOwor ICBpZiAocC0+ZmlsdGVyID09IFFpbnRlcm5hbF9kZWZhdWx0X3Byb2Nlc3NfZmlsdGVyKQor ICAgIHsKKyAgICAgIExpc3BfT2JqZWN0IHRleHQ7CisgICAgICBkZWNvZGVfY29kaW5nX2Nf c3RyaW5nIChjb2RpbmcsICh1bnNpZ25lZCBjaGFyICopIGNoYXJzLCBuYnl0ZXMsIFF0KTsK KyAgICAgIHRleHQgPSBjb2RpbmctPmRzdF9vYmplY3Q7CisgICAgICBGaW50ZXJuYWxfZGVm YXVsdF9wcm9jZXNzX2ZpbHRlciAocHJvYywgdGV4dCk7CisgICAgfQorICBlbHNlCisgICAg cmVhZF9hbmRfZGlzcG9zZV9vZl9wcm9jZXNzX291dHB1dCAocCwgY2hhcnMsIG5ieXRlcywg Y29kaW5nKTsKIAogICAvKiBIYW5kbGluZyB0aGUgcHJvY2VzcyBvdXRwdXQgc2hvdWxkIG5v dCBkZWFjdGl2YXRlIHRoZSBtYXJrLiAgKi8KICAgVmRlYWN0aXZhdGVfbWFyayA9IG9kZWFj dGl2YXRlOwo= --------------pNrGtcmBObRwwOXzSA0eJQDE Content-Type: text/x-patch; charset=UTF-8; name="read_and_insert_process_output.diff" Content-Disposition: attachment; filename="read_and_insert_process_output.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IDA4Y2I4 MTBlYzEzLi41ZGI1NjY5MmZlMSAxMDA2NDQKLS0tIGEvc3JjL3Byb2Nlc3MuYworKysgYi9z cmMvcHJvY2Vzcy5jCkBAIC02MTEyLDYgKzYxMTIsMTEgQEAgcmVhZF9hbmRfZGlzcG9zZV9v Zl9wcm9jZXNzX291dHB1dCAoc3RydWN0IExpc3BfUHJvY2VzcyAqcCwgY2hhciAqY2hhcnMs CiAJCQkJICAgIHNzaXplX3QgbmJ5dGVzLAogCQkJCSAgICBzdHJ1Y3QgY29kaW5nX3N5c3Rl bSAqY29kaW5nKTsKIAorc3RhdGljIHZvaWQ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