From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up Date: Wed, 8 Jan 2020 16:52:21 +0300 Message-ID: <6255626b-0422-c1d2-af66-5cbd0f496719@yandex.ru> References: <20200107133628.1996.14412@vcs0.savannah.gnu.org> <20200107133629.2E736211A5@vcs0.savannah.gnu.org> <87y2uiiakq.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="99191"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 To: Michael Albinus , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 08 14:53:39 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 1ipBlg-0001DZ-7L for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 14:53:04 +0100 Original-Received: from localhost ([::1]:44272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipBlf-0008By-57 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 08:53:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53256) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipBl5-0007XI-3M for emacs-devel@gnu.org; Wed, 08 Jan 2020 08:52:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipBl3-0001bQ-Rm for emacs-devel@gnu.org; Wed, 08 Jan 2020 08:52:26 -0500 Original-Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:44329) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipBl3-0001a9-KJ for emacs-devel@gnu.org; Wed, 08 Jan 2020 08:52:25 -0500 Original-Received: by mail-lj1-x234.google.com with SMTP id u71so3354469lje.11 for ; Wed, 08 Jan 2020 05:52:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HvjWr0piUrWMT/JGpFW1jI9OC8drQq+SheN85MXjHyw=; b=ppxbe292xHZiSeo3nCLzmg9QiJxRliFbIcAn+MLLhnNkX4ePyInaVFC9pnS+gbDSN1 UqrqqkTk0GOsI0rSwKXPzQkTVtMblxpThKmPf+8ilsRWtyd0uf9MEl9OyuQMtdmKoZrw KnkXw2wGk94By9SDeJBo/MnzAepwDVg77V4K0vkkXP3WA4gb8Uh+rTRg5pXbxZGQ88Dh 0FcdOl0o+l0BSIa7QVQT0zLDErfbBPZfv4Aid55/3907yPaqZVUo/xkaoY7kQoQUhoxe arQEn+93DZrtwF0qbu3fTaIG2eZG3ch97UIk0SIKUD1GtxiWHK69L2NfIw5UTbHiocwQ Gnyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HvjWr0piUrWMT/JGpFW1jI9OC8drQq+SheN85MXjHyw=; b=ahV2OrU6TIDdrLKAYIKFi8AOpiUW3xTdIuYbacUyj5YgOXlBdWQJoAioPSZQPvmnfI G/diQcQ4/cXJ2z2WpiSVENMgFCNcC7lSLaCXlIBXNrnzcSuZOCfWbr2xNiFo/A33J665 xEe6wsXaymVQP6kGYnUdQ4Uf7dJezdJ3cqmrnxK3JeRC3wL0QkcKvhIc7a1+PSsQJmFH ZhdbyduUMhTyZRt+uTi9+YiWcmxCDDBK2870H4su2urQB7+/977n3xLfQy/kuR8XE66a RmxGSYEcgPh9Jih0FuSmClQg4X24lLPx2J1arCJdwTRwTh75lU3E6Tn4qmrARwM7+Ysr LI3g== X-Gm-Message-State: APjAAAV8tQTQ68e6Vioigs0bBpXfnMmXrEhpvF4vICaVKQbQ4Lb69qiF bRAcNldtIfESvJWpmEE8HxJhyR2MtcQ= X-Google-Smtp-Source: APXvYqysBSlEALtffGEzbjM9CmRMh2bFMKhsvPo+s4BqUxp4UjGbJ/t+tUgwqHc0OJaPuDpuUCxwpA== X-Received: by 2002:a2e:3e03:: with SMTP id l3mr3029645lja.237.1578491542615; Wed, 08 Jan 2020 05:52:22 -0800 (PST) Original-Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id u16sm1625195lfi.36.2020.01.08.05.52.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2020 05:52:21 -0800 (PST) In-Reply-To: <87y2uiiakq.fsf@gmx.de> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::234 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:244118 Archived-At: Hi Michael, On 08.01.2020 11:03, Michael Albinus wrote: > dgutov@yandex.ru (Dmitry Gutov) writes: > >> xref-matches-in-files: Big Tramp speed-up >> >> * lisp/progmodes/xref.el (xref-matches-in-files): >> Greatly improve performance with remote files using Tramp >> (bug#34343). > > Thanks. I've made a further improvement in tramp-file-local-name. In > case NAME is not a Tramp file name, it calls file-local-name now. > > This is to handle use cases like > > (copy-file "/ssh:host:/path/index.html" "https://example.com/path/index.html") > > and more subtle constellations. Looks like a good change, functionality-wise. But speaking of the change below, I'll probably make it, but upon reading the code anybody would struggle to guess that this function can handle other local names, not just Tramp ones. >> + (setq files (mapcar >> + (if (tramp-tramp-file-p dir) >> + #'tramp-file-local-name >> + #'file-local-name) >> + files))) > > You can change this now to > > (setq files (mapcar #'tramp-file-local-name files)) This will shorten the code, and it'll require one fewer declare-function in the file. But allow me to state for the record once more that I'm puzzled by the architectural choice we're working with here.