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: Dired C idea Date: Tue, 03 Aug 2021 13:43:14 +0200 Message-ID: <87mtpypxd9.fsf@gmx.de> References: <87sfzur4gi.fsf@gmx.de> <877dh5r4gd.fsf@gmx.de> <87tuk7q1mx.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38646"; 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: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 03 13:45:10 2021 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 1mAsr8-0009q2-Eb for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 13:45:10 +0200 Original-Received: from localhost ([::1]:51826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAsr7-0001dT-4E for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 07:45:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAspM-0008B1-Mm for emacs-devel@gnu.org; Tue, 03 Aug 2021 07:43:20 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:55117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAspK-0005ef-QZ; Tue, 03 Aug 2021 07:43:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627990996; bh=3QCndOHk45RWHHAYrH0gTw36p+aqGcZhIrdvYEZr6MU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=IbJ7IQywefITBul4zuqqKqwVzaCRzwcK5YuVeVKb8As5HQDGGULifPqbrwpRyI1RR GV/XMUOgQ9BCAdO1JXVex4CUQT+YvPFeshfMsGWdtdnryG1k9bNLdL3IFnMCsRsgNS 2HUMYq0bT9Yhya7AMuY+XylLNNDlVH1dZNfBRTBw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([217.70.140.133]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwfWU-1n4dqA0esc-00y9PO; Tue, 03 Aug 2021 13:43:16 +0200 In-Reply-To: <87tuk7q1mx.fsf@gmx.de> (Michael Albinus's message of "Mon, 02 Aug 2021 17:58:46 +0200") X-Provags-ID: V03:K1:AM0tGa6bPhq8m094fSN2A2+JvjM0hkzi0NfRNWo3bGzEUCrtF12 JPb51qFLRiXMmNh/m9ssN986PjCv+evsF/FyLpvD2i4bGTJ68UP38hieE7iSVM7bqKaoG8X UMcMkXdTf9/v2TdSP0qQcIUVs+CK1oKhRhxdReiuZtXvAy1hfIshSUXY4Y8ZPgNbOxV4GUS x2wnFZjAqR6YSh5//Py/w== X-UI-Out-Filterresults: notjunk:1;V03:K0:J9WpJOZ9gok=:59KEBF0M2LBbEZTaVKZjqO +sE7jRe28pgkur9UUrw+i23bEiT2vAgHJ5qh5vY0igr3GA481B3uYUESu37kuBh/wiX9aGcGX 6mNk+c3DXg80y5WSTBVi3uzsWPcQMWtYz5SA1j5QMNoh5mwFcKjHinJxyeoqCntxbiWCVvgJQ a3s6inkrBVefkBvE6Jtti10XpLvnCBA/fnp0d33oTvhEEJhcIMo/Cjg7BUFXQYL1lnONOxTrs gZy3XrYu+A2szkQM2E/DybJt2UquCz/rnarzZVWn1MdyMNZizbZkMbvjT11My9QpXdIf2yqXV xgBih32OF7CGDAM7Q4xcHovV8FokbLh7wZ01hOuF+RvY62gjXev20RaGChvMmLNb6I+SZG9Yv yz+cDDWtfrUPcN8BETUx4oxpCWGlTELowjUR6RD/PHx4Sr4kanUz8MqCPO/b8ZTuc3moq0H4J GYWcCEnwCPfu/n4TadrFtOVikQS7TdnsC+o9g4AAQSijT4K5h6YvMSk9ZyLFzB20/PDxt5kdV NkMBvJcA6yf+jjTreEvq1snJmJRoxg7fZqlKR4KJn0QsIVdhy0/ufd4h7Y+HzkbQ9RBS0zgqU 6BGP4iUGsih5ovQTtgCkcll8C6B2DX6XEGPuqvjesfFAROpoFmIODVBeQ4hYWG9WPppqgem2/ 5pXfDvIhhtee+QPkY7yMYCLM0MIMHcPEcf6W4ZdttUsmvx4wkYc5u8fb4slefR9QURq0jVsoA k+1IIt+9Aih0F3YJcBUocUEe8ar9aPw8uDD7G5iWdLFQZLAFkqoLv0dhfYmoJkSdnrnMz/Vw Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, 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:271961 Archived-At: Michael Albinus writes: >> > Should be feasible. The hard part is a rule to determine, whether rsync >> > is better suited than the existing implementation, with the given actual >> > arguments. I suspect, that small directories and/or short files are >> > better served with the current implementation. >> >> Do we really need to decide this? Wouldn't it be ok to use rsync >> for all cases (where Tramp is not in use)? > > I would like to see some benchmark figures first. For example, I'm not > sure that rsync performs better when the target directory does not exist > yet, and there's nothing to sync. I made some comparison between "cp -pr" and "rsync -pr" on shell level. I've copied the whole Emacs tree to somewhere else. First the case, that the target does not exist: $ time cp -pr ~/src/emacs /tmp/emacs.cp 0.086u 1.322s 0:04.43 31.6% 0+0k 1817688+0io 1pf+0w $ time rsync -pr ~/src/emacs /tmp/emacs.rsync 5.776u 2.069s 0:05.76 135.9% 0+0k 1384384+0io 1pf+0w "rsync -pr" is slower than "cp -pr". Now I've applied the rsync command again, to the unchanged directory tree with exisiting target: $ time rsync -pr ~/src/emacs /tmp/emacs.rsync 6.116u 2.457s 0:06.63 129.1% 0+0k 1069632+0io 4pf+0w It is even a little bit slower than the first rsync run. So I don't know, whether there is really a performance boost when we use rsync for local directory copies. OTOH, `copy-directory' in files.el runs recursively `copy-file', file-wise. Perhaps we could improve this implementation on C level. Best regards, Michael.