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: Thu, 9 Jan 2020 02:42:17 +0300 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> <877e21iuar.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="43551"; 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 Cc: emacs-devel@gnu.org To: Stefan Monnier , Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 09 00:43:17 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 1ipKyX-0013nx-IA for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Jan 2020 00:42:57 +0100 Original-Received: from localhost ([::1]:50528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipKyW-0003K1-6i for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jan 2020 18:42:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59048) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipKxz-0002st-6f for emacs-devel@gnu.org; Wed, 08 Jan 2020 18:42:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipKxx-0004oz-UP for emacs-devel@gnu.org; Wed, 08 Jan 2020 18:42:23 -0500 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:42720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipKxx-0004me-MF for emacs-devel@gnu.org; Wed, 08 Jan 2020 18:42:21 -0500 Original-Received: by mail-lj1-x233.google.com with SMTP id y4so5150990ljj.9 for ; Wed, 08 Jan 2020 15:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=D++is6opYQSMBsTbXX9WrEZ0UrFLAL879liPJSdJIBY=; b=oUc7R5GRimb7boXAGLTkA7NWLxIV/rCEfB8if+IwyjdpJMypC8ajn57gkQcpOVqIDb BUr/WA/fEW7hd9ZC0M0IJ45dLW40OMwTBoCLVUNoFiXt19RsM3ODMMK5YSBtwvf0D+U1 icbKoW8pR/BKszITWXsG4eqwsuNdfxv6zsnbwe1R4WIHe96JRDCXhpEWODq5NGIpfk3b OT39EGVqQT6CzzL3QZeJbj/J9NM86Kft/hHopXdUjjaxsA9I9aLigoGG8/89eazasx5O Xzkb4VQL5fxYCgzX43emcFyrC9QmzmcHgb52yCs5lwfrSfGFgWAOAqQavdv+b63+9D69 8S+A== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=D++is6opYQSMBsTbXX9WrEZ0UrFLAL879liPJSdJIBY=; b=k2KUYMGsI3EwLOdrRAnZ54j98STsCwfLcqoQt2wH2JLZ+9+oh16/mtpIPpHPeTCaJh OifDenI7ba3RUkxy5QFuQ6VL/zZFBhGrZwQF3uBZt8cQ01Rnz0YnM2EQi0emzMXwtOxC uv1muiIBkr4YNGfBTgiheFrNqQTu6LgqNqW4fMKUISIqIyxagYc/eqBzl68oVUkvgHw9 oEm5d9rMOvGyOFCi8O7CJDN/80z/2OkPK+0X0zbzh2P3G5eWUfQqnkNrdGRsJpX9W6M2 rC5Xr5r3Q393QhC6Hk/EqOJPZH0Y9mZPtUQ3C+ONHOEmog8vLUXB/e/4LXNdieImgV52 yqJw== X-Gm-Message-State: APjAAAXvjRSSDTZMMcVsUoqXEBH85ZxrSW7aRnW98ehg4b07TPMcpd94 CJhpB3KpB/BBwPHKhNCtL7Xv7ilVMBo= X-Google-Smtp-Source: APXvYqxVKqE4fKbPVhoJUiVNw3K1oX6yQ3WmjS6JUk+QzzhNF7wiV2T+SHfVJKEdun/m3ue7pGhu8A== X-Received: by 2002:a2e:8152:: with SMTP id t18mr4373885ljg.255.1578526939865; Wed, 08 Jan 2020 15:42:19 -0800 (PST) Original-Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id g27sm2111665lfj.49.2020.01.08.15.42.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jan 2020 15:42:18 -0800 (PST) In-Reply-To: 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::233 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:244154 Archived-At: On 08.01.2020 22:51, Stefan Monnier wrote: > Yes, I saw that, but it's still not clear to me which part of this costs > so much more than tramp-file-local-name itself, nor why. The whole of it, mostly. I've shown a simple patch which improved performance a lot, by Michael says it's unmaintainable (IIUC): https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34343#83 (and there's a follow-up suggestion later) By the way, the commit under discussion already references this bug report. > The "remote" pat would presumably be in the DIR argument (DIR would > presumably be the root of the project or something like that). The current discussion is about xref-matches-in-files where Grep acts on a list of files, not a directory. It's used by both project-find-regexp and dired-do-find-regexp. > Actually, maybe xref could apply `file-local-name` to the root of > the project? See above. It's not about projects only. I've considered about having xref-matches-in-files also accept a (REMOTE-ID LOCAL-FILES) struct, but that's also increase in complexity, in all callers and related APIs, which will also affect maintainability. So it's doable, but I'd rather make a good effort and fix it in Tramp to have everyone benefit automatically.