From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up Date: Wed, 08 Jan 2020 13:56:03 -0500 Message-ID: References: <20200107133628.1996.14412@vcs0.savannah.gnu.org> <20200107133629.2E736211A5@vcs0.savannah.gnu.org> <87y2uiiakq.fsf@gmx.de> <6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru> <87muayhw8q.fsf@gmx.de> <87h816htg2.fsf@gmx.de> <87blrdj3zv.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="180194"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 08 19:58:07 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ipGWZ-000PCV-Rn for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 19:57:48 +0100 Original-Received: from localhost ([::1]:48092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipGWY-0001JF-I7 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 13:57:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49677) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipGUy-0007OM-Ad for emacs-devel@gnu.org; Wed, 08 Jan 2020 13:56:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipGUw-00017h-Nd for emacs-devel@gnu.org; Wed, 08 Jan 2020 13:56:07 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32702) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipGUw-00016I-Fv for emacs-devel@gnu.org; Wed, 08 Jan 2020 13:56:06 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9E7D244DBC3; Wed, 8 Jan 2020 13:56:05 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2433244DBC1; Wed, 8 Jan 2020 13:56:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1578509764; bh=J0lk3qbJOQLTPJBg1QM14jW7OA23IySZ6YTIcAY1Epw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QMlBVlmUX4OKecMak0MnBAHykzWiKArPeWwC2tpnCcHrmUHEF0ItzKfKXuEnrHVLJ nz7xl96A3MBXwSsui6I2d1rr7CJ164eo0DHsK51OqQWrVZMxtNmDpTxjagZ4m8haV8 YacdqI4HYFuYTcHmBlaPSlLEdYQRQysWhWJMSIgG+A2Qf0+BJOphQhs4tfQ7uPxnJ5 Hq6tEuNDf13o7Z5R5oVJWiTh606/tH4DW1JP3EwLGnrcYhkIlBug+e0W8aZtybccc3 ldWCL7X7kgnNknkooD1WWKcrQelNxEd4kRgxUHHrIm9NTsCP9rjP/eQvL+IcTW/3mO DL4LuNb9Q28IA== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0B77012066A; Wed, 8 Jan 2020 13:56:04 -0500 (EST) In-Reply-To: <87blrdj3zv.fsf@gmx.de> (Michael Albinus's message of "Wed, 08 Jan 2020 17:40:36 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:244145 Archived-At: >> Hmm... I guess this deserves a bug number and we should try and figure >> out why it's so much slower to go through the file-handler machinery >> (and whether we can do something about it other than provide ad-hoc >> coarse-grained operations). > The file name handler machinery is designed for single files. If you > have some ten thousands files, which have all the same remote > identification, and for which the same operation will be applied, this > doesn't scale well. I understand that if we can treat a whole set of files which we know all live below some directory, then some of the processing can be performed just once instead of N times. But in the current case, we just replace N calls to `file-local-name` with N calls to `tramp-file-local-name` and it's supposedly already much faster, even though `tramp-file-local-name` doesn't get to share work between all those calls, AFAIK. It's *this* speed difference which I'd like to understand. > That's why I have proposed to find a way to apply an operation to a > fileset instead of a single file only. Yes, the idea makes sense. Basically add a magic-file-op (file-list-apply FUNCTION DIR FILES &rest ARGS) where FILES are relative to DIR? Stefan