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 11:25:10 -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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210350"; 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 17:27:37 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 1ipE98-000KPy-Hv for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 17:25:26 +0100 Original-Received: from localhost ([::1]:46354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipE97-00057v-3n for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 11:25:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49209) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipE8Y-0004gc-Q9 for emacs-devel@gnu.org; Wed, 08 Jan 2020 11:24:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipE8X-00046I-B7 for emacs-devel@gnu.org; Wed, 08 Jan 2020 11:24:50 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37031) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipE8W-00045o-W6 for emacs-devel@gnu.org; Wed, 08 Jan 2020 11:24:49 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7665F10080B; Wed, 8 Jan 2020 11:24:47 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EB90D1002CF; Wed, 8 Jan 2020 11:24:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1578500685; bh=ee15cTkbsInciZVx70A/5UumhTdarGBqcfU0lDJrn5U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZY7TDBIVSslsLc+AAPp4dlMNn1Gyq+udsthqUiSZei8W7ZOXlmdKOzo8s5JK9PJtN NnKUB/52PLk4unRsJheMLzlJPhzbFmqozJajtNKNQJKG/ThbzOJ9ND4RrXsgO6SyH5 mBVv+EcDrC3Fyd+i08VW17RumRcT7OVipWLGc13FMiSt92kUuV1V2Z+d7/MxXyQBQS N6LpX73ZeAZcPQJbNoDIq3U3yIscebnTtzB9MRoFGQ8ZObgdXtOMT7KJyOrTOsdfvQ D1UTMNo6IJF1BgrNkpI1jG0l3OBjrMLth14rh4rdR5hqmbtVHrAD+QmzYLVXRjL9Lm pUFHPb83muh2w== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A5A7312053A; Wed, 8 Jan 2020 11:24:44 -0500 (EST) In-Reply-To: <87h816htg2.fsf@gmx.de> (Michael Albinus's message of "Wed, 08 Jan 2020 16:13:49 +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:244126 Archived-At: >>>> But allow me to state for the record once more that I'm puzzled by the >>>> architectural choice we're working with here. >>> I know that. Tramp follows the generic file name handler approach, as >>> described in (info "(elisp) Magic File Names") . >> Could someone explain to me why `file-local-name` has to be so much slower >> than `tramp-file-local-name`? > Internally, `file-local-name' uses `file-remote-p'. The latter goes > through the file name handler machinery, and `tramp-file-name-handler' > eats time, according to Dmitry's measures. Usually not a problem, but > remarkable when you apply it to some ten thousand files as in > `xref-matches-in-files'. [ I think this should be in a comment in the code ;-) ] 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). Stefan