emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/dired-du 4eae6a3 3/7: Speed up the load of the dired bu


From: Stefan Monnier
Subject: [elpa] externals/dired-du 4eae6a3 3/7: Speed up the load of the dired buffer
Date: Tue, 1 Dec 2020 10:50:58 -0500 (EST)

branch: externals/dired-du
commit 4eae6a3d1276f1d114c68eee706cc9e8e0dbb007
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Tino Calancha <tino.calancha@gmail.com>

    Speed up the load of the dired buffer
    
    It has been noted that we can significantly speed up the load
    of the Dired buffer by checking more often the completion of the
    `du' processes.
    Problem reported by Pierre Neidhardt here:
    https://github.com/calancha/dired-du/issues/1
    * packages/dired-du/dired-du.el 
(dired-du-get-recursive-dir-size-in-parallel): check
    for `du' process completion more often.
---
 dired-du.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dired-du.el b/dired-du.el
index 7020170..429bb81 100644
--- a/dired-du.el
+++ b/dired-du.el
@@ -9,9 +9,9 @@
 ;; Created: Wed Mar 23 22:54:00 2016
 ;; Version: 0.5
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
-;; Last-Updated: Sat May 27 18:30:02 JST 2017
+;; Last-Updated: Mon Sep 24 19:40:04 JST 2018
 ;;           By: calancha
-;;     Update #: 339
+;;     Update #: 340
 ;; Compatibility: GNU Emacs: 24.4
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -665,7 +665,10 @@ The return value is an alist (DIRNAME . SIZE)."
                                (setq old completed))
                              (setq completed (count-lines (point-min)
                                                           (point-max)))
-                             (sleep-for 1))))
+                             ;; Give a bit of time to the process to end.  
Initially we
+                             ;; were waiting 1 s; it turned out to be too 
conservative value.
+                             ;; TODO: Shouldn't this be run in a sentinel?
+                             (sleep-for 0 10))))
                        ;; collect dir sizes.
                        (goto-char 1)
                        (while (re-search-forward "^[0-9]+" nil t)



reply via email to

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