From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: disk-usage Date: Tue, 26 Feb 2019 16:08:23 +0100 Message-ID: <875zt61taw.fsf@ambrevar.xyz> References: <87imxgmacr.fsf@ambrevar.xyz> <874l8z7cmi.fsf@gmx.de> <874l8zr0cs.fsf@ambrevar.xyz> <87zhqr5x81.fsf@gmx.de> <8736ojqyj1.fsf@ambrevar.xyz> <87mumqkhkm.fsf@ambrevar.xyz> <87bm31nm5w.fsf@ambrevar.xyz> <87ftsarc92.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="143090"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.0; emacs 26.1 Cc: Emacs developers To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 16:08:53 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyeLl-000b8J-KN for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2019 16:08:53 +0100 Original-Received: from localhost ([127.0.0.1]:56907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyeLk-0006p7-Li for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2019 10:08:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyeLa-0006ox-50 for emacs-devel@gnu.org; Tue, 26 Feb 2019 10:08:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyeLY-00018a-Qk for emacs-devel@gnu.org; Tue, 26 Feb 2019 10:08:42 -0500 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:35599) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyeLX-0000yC-HL for emacs-devel@gnu.org; Tue, 26 Feb 2019 10:08:40 -0500 Original-Received: from bababa (lfbn-1-12225-33.w90-92.abo.wanadoo.fr [90.92.41.33]) (Authenticated sender: mail@ambrevar.xyz) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DBE7020000D; Tue, 26 Feb 2019 15:08:23 +0000 (UTC) In-reply-to: <87ftsarc92.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.178.232 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:233635 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Great review, thanks you very much. I'll apply all your suggestions. Need= to discuss this one though: > * In `disk-usage--list-recursively', you make a loop over > > for attributes =3D (file-attributes name) > > This is slow, at least on remote systems, because you apply > `file-attributes' on every file on a possibly large list. Maybe you > could call `directory-files-and-attributes' per directory, instead. Hmmm, not sure about this, because walking a directory recursively with directory-files-and-attributes is extremely slow, which is why I resorted to using the `find' shell command instead. Alternatively, I could mix-match both approaches: run `find' to list all directories recursively, then run `directory-files-and-attributes` on this = result. Does anyone have experience with that kind of performance issues? The upside is that it would remove the need for custom `find' arguments sin= ce the following is portable: =2D-8<---------------cut here---------------start------------->8--- find DIR -type d =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlx1VmcACgkQm9z0l6S7 zH8QNAf/Sj62JD+JL+P3hYnFSil4e8UT78OMytt/e9KfIoqUkPBU62ljyuyE1mGN t8pZTmTRR89PyAXVq8Nf+kKtrwVRUj6IwctwZeKSnWJGiNYpZLcuSJky40LZXQd5 xEunvi0YpBZ3sRjdm2xIRpqVTenNFdmGO80JwzR8dpAevwyxeD7N2i+6Nmui15fR JT19WsI2TjQ9IgDLJIaSh7vSewvReOKwqpgHwV3VqqVnN5OkA6G8obelALRJ8Dwj eNXbHEjfV8uFQVtzTo2JiekXG6RPrxWOPpZ1mqaliM0/6jEOGzikoyZmhOTuUz0x 0IS7yoMFJ4P8Bz9E65zEbxdGVlhZFw== =hlGW -----END PGP SIGNATURE----- --=-=-=--