From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#64735: 29.0.92; find invocations are ~15x slower because of ignores Date: Sun, 23 Jul 2023 08:11:56 +0000 Message-ID: <87351frqr7.fsf@localhost> References: <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> <87pm4krq2m.fsf@localhost> <838rb881ak.fsf@gnu.org> <87mszornlq.fsf@localhost> <83351g7yn5.fsf@gnu.org> <875y6brrnk.fsf@localhost> <83fs5f6opg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2324"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, rms@gnu.org, sbaugh@catern.com, dmitry@gutov.dev, michael.albinus@gmx.de, 64735@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 23 10:12:18 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 1qNUCP-0000Oc-GJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Jul 2023 10:12:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNUCC-00056r-EZ; Sun, 23 Jul 2023 04:12: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 1qNUCB-00056j-Lm for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:12: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 1qNUCB-000409-Dp for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNUCA-0002r6-8W for bug-gnu-emacs@gnu.org; Sun, 23 Jul 2023 04:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jul 2023 08:12:02 +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.169009991310960 (code B ref 64735); Sun, 23 Jul 2023 08:12:02 +0000 Original-Received: (at 64735) by debbugs.gnu.org; 23 Jul 2023 08:11:53 +0000 Original-Received: from localhost ([127.0.0.1]:37930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNUC0-0002qg-Sg for submit@debbugs.gnu.org; Sun, 23 Jul 2023 04:11:53 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:36859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNUBy-0002qR-4W for 64735@debbugs.gnu.org; Sun, 23 Jul 2023 04:11:51 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2B705240104 for <64735@debbugs.gnu.org>; Sun, 23 Jul 2023 10:11:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690099904; bh=OuBq0iEkxwNimnYc05k4ItVLvYsucmOrhiyXYRC3F9w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=bALxblN2eu1XB878ibZ90/t+56aSUKZckksgjmYTI+8STC5eDtAP/GwXpb8ckCsIq qhyK9bZm0sfSXhIEI6/Oe/Xp/5pIRcmXNAaw7aa63ah9f51dMXsU9nRn+pbOCN3EzP RMxS+p56P8XOHhRqrGZ7yi93J88CHhPYwhxuQauCvi67ca9dA7BNPt0arceZ1ouCR/ wf5BB/qngoGPe4uBPY4eO1flVIKSjYx6i1mKiTUYF3949y30W7pTySg71yJX9pzdpY G8KppGzdd+4NEf723I6kNz05ZofyCWJ/ol2O24BT3DzKCt2hsvmkH5Tk9UtCVb+G9F Y9GqDqr5/thvQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R7wxB60mfz9ryh; Sun, 23 Jul 2023 10:11:42 +0200 (CEST) In-Reply-To: <83fs5f6opg.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:265874 Archived-At: Eli Zaretskii writes: >> >> Then how will the callback be different from >> >> (mapc #'my-function (directory-files-recursively ...)) >> >> ? >> > >> > It depends on the application. Applications that want to get all the >> > data and only after that process it will not use the callback. But I >> > can certainly imagine an application that inserts the file names, or >> > some of their transforms, into a buffer, and from time to time >> > triggers redisplay to show the partial results. Or an application >> > could write the file names to some disk file or external consumer, or >> > send them to a network process. >> >> But won't the Elisp callback always result in a queue that will >> effectively be synchronous? > > I don't understand the question (what queue?), and understand even > less what you are trying to say here. Please elaborate. Consider (async-directory-files-recursively dir regexp callback) with callback being (lambda (file) (start-process "Copy" nil "cp" file "/tmp/")). `async-directory-files-recursively' may fire CALLBACK very frequently. According to the other benchmarks in this thread, a file from directory may be retrieved within 10E-6s or even less. Elisp will have to arrange the callbacks to run immediately one after other (in a queue). Which will not be very different compared to just running callbacks in a synchronous loop. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at