[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: disk-usage

From: Pierre Neidhardt
Subject: Re: [ELPA] New package: disk-usage
Date: Tue, 26 Feb 2019 16:08:23 +0100
User-agent: mu4e 1.0; emacs 26.1

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 = (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 

Does anyone have experience with that kind of performance issues?

The upside is that it would remove the need for custom `find' arguments since
the following is portable:

--8<---------------cut here---------------start------------->8---
  find DIR -type d
--8<---------------cut here---------------end--------------->8---

Pierre Neidhardt

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]