From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Introducing thread-safe Tramp Date: Mon, 23 Jul 2018 17:58:39 +0200 Message-ID: <8736wa9c5s.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532361436 28579 195.159.176.226 (23 Jul 2018 15:57:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2018 15:57:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 17:57:11 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhdCx-0007K5-7e for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 17:57:11 +0200 Original-Received: from localhost ([::1]:35301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhdF4-000770-6W for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 11:59:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhdET-00076c-WC for emacs-devel@gnu.org; Mon, 23 Jul 2018 11:58:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhdEQ-0001Ny-Pm for emacs-devel@gnu.org; Mon, 23 Jul 2018 11:58:46 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:35327) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhdEQ-0001NY-Eu for emacs-devel@gnu.org; Mon, 23 Jul 2018 11:58:42 -0400 Original-Received: from detlef.gmx.de ([178.20.95.13]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4WRI-1fvhhk37zI-00yjDm; Mon, 23 Jul 2018 17:58:40 +0200 X-Provags-ID: V03:K1:jGl5jUKxThkwpp8XoZxiTBzRFbnkYNxEurzalvl5NU2rtOy6c4q 98X4f9ZOY2NwAl2y/EFsBNwmaDEP+i1+BOguO3AX0dOXMP2SR5292gqL+PZe6maCOFiIgLx CGXkoM0yHfpfHSAxGxXtFtME3pIQ+7JJuloTTPlV9PHl4vZY73OQWlizTRqpj4vvnkddNqM uMMHmzahNVCNFTtyaMHhw== X-UI-Out-Filterresults: notjunk:1;V01:K0:QRZsIgVk2MY=:C5CntwXyeAAgWsv34uRwkz 1ncbdNuXkr6pAYpZgbfB2q8l0/sZHrudgMZAaX/sYkwcrn7TsjC7LbwDKH17SXYi6vS6LnFRJ f8kq+T80jIVA77W8TAjueRAkPgfy/jcsyxt/XkgWiAbnSsiJrVk7fzY7bJg5zz/KkN6L8bU/u PuVu8MluUP4GgTC5g2piI30XA9mjPzzHdnf/w/QaEFGDUOswWWUs84L8mjuAPjm8oHNzwbusl e2kMF0HCYDxcKNCBU2O+6W1IGKesp1WD1Ii7ryuN416gM1Gm5Z5K/g5NVx7yN5+clJGVWPhUI tb5Su97epRmpFWGc/k4Q5pZiW7HCp0AHhpP1phbzSbQ1K05nkHqa+DPA8ia1TfQguiIRHrfqD NX7Vux/r5lpx7t8Y0sXccMdv9GcrnAZ1thf4meIjMMv7ps4VOpip1rwnq4yatp7wx0otSjSY9 oFNSDLAEG57Vf4az9bfjJ8tkVK+yM1Fo3LRHJeFLSTw0+3rabIXO8gIWH+1WRC/3fcFU2gW2G 8Or/gF2lsIDAlSj8FVbr6c4jTkZxFZZYoOoltF7xrRwwcT3D3fCb7ezihG1DeDmDavhp3TKfK yw3tI88uwP22aR7L9/US/MNnPaQ0mr3Dm7pQZ7Ck1IIcZYnLRFSuWJS0SiBTJDio1kvk99SrC XYZKWGSz4BLk8+yTpzm3FXhr+lqBeM+VtqYsCk6ct7TwY51CWyfK8iCkaqyCC18IPxDGLk/bd vsGBPpGW+7CBq+BUV7h9OVRvxubb7nANP/mW5HrFx+EUt0HZzOvc9a+PZFDAtryjz090nNFK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227725 Archived-At: Hi, I have created a new branch feature/tramp-thread-safe. The major change is making Tramp thread-safe, that means, several basic file operations can run concurrently now. Being a library, Tramp does not create new threads on its own. This must be performed by the callers. I have changed the `find-file' family of commands to raise their underlying file operations asynchronously if indicated. Every visiting of a file happens in its own thread then. If wildcards are used, one thread per involved file is created. In order to enable this, the respective command must be called with a prefix argument, like "C-u C-x C-f ...". Emacs will remain responsive, you can continue with whatever operation. This will be best seen with remote files, because they need more time to load into a buffer. Emacs is not as responsive yet as I hoped to achieve; further optimization is needed. As second change, I have modified `vc-refresh-state' to run always in its own thread. This is because I have observed, that for git repositories, loading a remote file is often much faster than the following update of its state in the modeline. For the time being this behaviour is hard-coded, I haven't seen any drawback for this even for local files. But we could trigger it also via a user option. @Dmitry? Please give it as much testing as possible. I cannot promise Emacs won't crash ever with these changes, so it is not time for production systems. But all bug reports and feedbacks will help to improve this new feature. And, if there are not too serious complaints, I will merge it into master after a while :-) You are warned! Best regards, Michael.