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.bugs Subject: bug#64735: 29.0.92; find invocations are ~15x slower because of ignores Date: Sat, 22 Jul 2023 21:31:14 +0300 Message-ID: <83v8eb7q8d.fsf@gnu.org> References: <87edl1scbw.fsf@gmx.de> <87fs5hmp6i.fsf@localhost> <87cz0lmoxy.fsf@localhost> <83v8edzb31.fsf@gnu.org> <87r0p1cta3.fsf@gmx.de> <87pm4ll7ox.fsf@localhost> <87a5vpcmc7.fsf@gmx.de> <878rb9l1f5.fsf@localhost> <87zg3pb6yt.fsf@gmx.de> <83zg3p9s39.fsf@gnu.org> <878rb944wi.fsf@localhost> <83tttx9q4v.fsf@gnu.org> <87pm4lb4fr.fsf@gmx.de> <83pm4l9n0o.fsf@gnu.org> <87jzutb14l.fsf@gmx.de> <83mszp9kl2.fsf@gnu.org> <83h6pwa52z.fsf@gnu.org> <87ilaci637.fsf@catern.com> <83sf9g88eh.fsf@gnu.org> <87cz0jj25g.fsf@catern.com> <83wmyr7sbq.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, yantar92@posteo.net, michael.albinus@gmx.de, rms@gnu.org, 64735@debbugs.gnu.org To: sbaugh@catern.com, sbaugh@janestreet.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 22 20:31:23 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 1qNHNz-0007p8-M4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jul 2023 20:31:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNHNg-00050v-A2; Sat, 22 Jul 2023 14:31:04 -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 1qNHNe-00050h-6K for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2023 14:31:03 -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 1qNHNd-00058I-Uw for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2023 14:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNHNd-0006Pd-Qn for bug-gnu-emacs@gnu.org; Sat, 22 Jul 2023 14:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jul 2023 18:31: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.169005065424636 (code B ref 64735); Sat, 22 Jul 2023 18:31:01 +0000 Original-Received: (at 64735) by debbugs.gnu.org; 22 Jul 2023 18:30:54 +0000 Original-Received: from localhost ([127.0.0.1]:37571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNHNV-0006PI-T3 for submit@debbugs.gnu.org; Sat, 22 Jul 2023 14:30:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNHNT-0006Os-3R for 64735@debbugs.gnu.org; Sat, 22 Jul 2023 14:30:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNHNN-00056Z-4q; Sat, 22 Jul 2023 14:30:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wwIJ3hXVgxXXSiWcZNJmiLbgxASrQvLWP9j/bmN2Oy8=; b=f3oSE/PxgaxX Ssk+ayhioFbald7Zxify3E4izcP52CIcMQKHo56GcV+i051Z1YIzZY2OrKo8MhMVf2l6G3w79U5CD Ao4vPWM1qaPAIcQ8BE5i9rZklORdSf+r2hc9avyskwX2KrzQyY+h5wEMbl8ul/7j4iiVCdKKY4rFO xX3JZOq0DRaZALHeWqaKZL1SeO/RKIg1BnEg8K4CbsRoDW2d9kVzE+yPSAdW6tNtMw3NriMyXYKPX sGLo9LkJqQdkfbtxgP8Tnuzm/9tsYyvmlhf735f6tGAZdY0utmNYSuYtHYBKGsvKrRZMHXuqlxCza t7CkTsdcr2TJJ6bm6xEHjw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNHNE-0008Lv-On; Sat, 22 Jul 2023 14:30:37 -0400 In-Reply-To: <83wmyr7sbq.fsf@gnu.org> (message from Eli Zaretskii on Sat, 22 Jul 2023 20:46:01 +0300) 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:265839 Archived-At: > Cc: sbaugh@janestreet.com, yantar92@posteo.net, rms@gnu.org, dmitry@gutov.dev, > michael.albinus@gmx.de, 64735@debbugs.gnu.org > Date: Sat, 22 Jul 2023 20:46:01 +0300 > From: Eli Zaretskii > > > First my results: > > > > (my-bench 100 "~/public_html" "") > > (("built-in" . "Elapsed time: 1.140173s (0.389344s in 5 GCs)") > > ("with-find" . "Elapsed time: 0.643306s (0.305130s in 4 GCs)")) > > > > (my-bench 10 "~/.local/src/linux" "") > > (("built-in" . "Elapsed time: 2.402341s (0.937857s in 11 GCs)") > > ("with-find" . "Elapsed time: 1.544024s (0.827364s in 10 GCs)")) > > > > (my-bench 100 "/ssh:catern.com:~/public_html" "") > > (("built-in" . "Elapsed time: 36.494233s (6.450840s in 79 GCs)") > > ("with-find" . "Elapsed time: 4.619035s (1.133656s in 14 GCs)")) > > > > 2x speedup on local files, and almost a 10x speedup for remote files. > > Thanks, that's impressive. But you omitted some of the features of > directory-files-recursively, see below. My results on MS-Windows are less encouraging: (my-bench 2 "d:/usr/archive" "") (("built-in" . "Elapsed time: 1.250000s (0.093750s in 5 GCs)") ("with-find" . "Elapsed time: 8.578125s (0.109375s in 7 GCs)")) D:/usr/archive is a directory with 372 subdirectories and more than 12000 files in all of them. The disk is SSD, in case it matters, and I measured this with a warm disk cache. So I guess whether or not to use this depends on the underlying system. Btw, you should not assume that "-type l" will universally work: at least on MS-Windows some ports of GNU Find will barf when they see it.