From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Remote asynchronous processes Date: Fri, 31 Jul 2020 12:22:11 +0200 Message-ID: <87a6zg0yss.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11249"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Felipe Lema Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 31 12:25:06 2020 Return-path: Envelope-to: ged-emacs-devel@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 1k1SDp-0002nP-AL for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jul 2020 12:25:05 +0200 Original-Received: from localhost ([::1]:45500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1SDn-00037r-Hv for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Jul 2020 06:25:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1SB8-00014w-AO for emacs-devel@gnu.org; Fri, 31 Jul 2020 06:22:18 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1SB6-0001TX-5F for emacs-devel@gnu.org; Fri, 31 Jul 2020 06:22:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1596190932; bh=5sS5a5yUlxtjTG7NT5N8hB92EXrmcDMnmoZaO4dtGD4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=TlAiI6akNH6yTXqsxwDvRoFA1j+Vivdbbbz+7G+uvK+u9HzBMrgYSh7Q95nhg0+dK MCu0eBR5cWe/wT5P8E7PPXLZUgqaU3Lb0JoCo8g0tdc40TrWrbIPV+wnPpCaCs8epo 5+Xwa5cO+wjOCem3smJ/1dQOu5oo64VrfWzCEVPk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.91.243.92]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MXXuH-1kH1Uh22lb-00Z3DK; Fri, 31 Jul 2020 12:22:12 +0200 In-Reply-To: (Felipe Lema's message of "Wed, 29 Jul 2020 12:58:34 -0400") X-Provags-ID: V03:K1:D9021lu3tpSLt++z6SAZtRpZo3XQWdaLfCGOThudJTlN7EgBlAN ARnyeMO6K/Ueg3gDDR9ZJMNv+DWZGvT1UIAbPtu80EpM7unbKOmlPBa2QX+B6NU3ptrQzK+ ACjfSlIkgdg3poKGebNYStywsa8Mlvtppk7ZqPv6RojioYOpqP/AHobJJDifkpErlSOmZGg Lvj4gBObYBjlkZB3PiSyw== X-UI-Out-Filterresults: notjunk:1;V03:K0:PsFGQA3uyag=:Ki02NV+s+r1Rv5Q8UZAqzM lLslHzjQ+oCcOpZ0aYPNG3MAj9SW3MQXFX2F4lvzZGnyJqvPl2tGMsQAeiaOH9yoaMF/JS8t1 +B8iE3QHE7gFe0niZYIoB1Za44qSksBxvKgLJ6QUtwlHf3U6b+17NW7gwQrtmQ28K92/1XmRS DVPFTQBzx6iQ6neoDzAh2vBug0tV+H0gFqBa1aganlSzw7GOvqrzNUrtBxTuzBqgD28AlG9xM aVnO13GMEvy53AmNg2x95r77nU80DXbtYCs85v0GN4YcE9jxtKOXrYdOjht4OGLOlYz9VesXg 9MDVM56XTnxpmGp739RUSb7gMD8SctAe1ABQZriKpZ8xoB7iITpLGHJs/4038U3fZ3+msY7fe 8XRR6Sv51ikjgIvJ/EHyBmnwds6Ix2CvpzKBO2cCUEEl+Hghkg+LK/k2Tc8TgrFrNHOajpAz3 cU8E7v41C/HmK64XRwAoObY1PsiNrub804yzr7gNKRCHIIBCGg2dForrF+VGCjyx0CIWkzPgD 8Hmx0kBiWA0Kqwy9KPnylIjCPpWIZEoK08wQE0BXSxW/WG1dPPjs39CReRQEIRgbmW1xP0up0 +Hqa9AahQmgD8/6iANUNHRcAplkLjic9/tHW5INWObqGFVeC0xCzB+faNxfETta86ssLCo+Qo colkt9HHCpP4fsYkOrI+E5ZhhRcRmeOCmADCaNuT3/k9e4psW3EMqp4D4jsml+3VcMYcPAya1 kTGMKTBpXrJJJKpQdjMio6NuJ377/dn51pQOaDUBw4KHdnxeHHEve96ef3gkHqcT5C1CSU0F Received-SPF: pass client-ip=212.227.15.19; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/31 06:22:12 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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.io gmane.emacs.devel:253359 Archived-At: Felipe Lema writes: > Hello, there (I hope I'm replying correctly) Hi Felipe, Yes, that's the correct reply. And I'm happy that you did. Since there hasn't been any response for months, I am closed to throw the code away. > I've tried this patch for async processes and, given that I deal with > far away servers that have a significant delay in answering queries, I > find this most useful. It cuts starting processes from about 5s to less > than 1s. I'm still undecided how to integrate it into Tramp. Since there are some restrictions (for example, it must be password-less), I fear a rise of fault reports ... > While this looks promising, I was also wondering about an alternative > solution. > > Instead of sending-and-waiting-for commands, can't these results be > stored in memory? That way tramp-sh can construct the "command to be > sent" /without/ doing queries. If necessary, the results stored in > memory can be updated frequently in the background. Maybe they can even > be persisted for future use (using the `persist` package). Tramp uses a cache. For every needed information it checks, whether it is already in the cache. If not, a command is sent remote in order to gather that information, and the result is cached again. You can see the cache in `tramp-cache-data'. This cache has a timeout, defined in `remote-file-name-inhibit-cache'. The default value is 10 seconds for evry singla data. You might increase the value (or set it to nil). This shall enable Tramp to use more cache values. > If this is not feasible, then I can manage with this "non-checks-just- > run-this-command-as-is" approach. If integrated, it must be optional per connection. There might be remote hosts which could be treated this way; and other hosts which might not. > Gards Best regards, Michael.