[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)
- [elpa] branch externals/dired-du created (now 32a0482), Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du d64df52 6/7: * packages/dired-du/dired-du.el: Fix typos, Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du 4eae6a3 3/7: Speed up the load of the dired buffer,
Stefan Monnier <=
- [elpa] externals/dired-du c586a6b 5/7: Support sort by size on ls-lisp for the directory sizes, Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du dd8dc21 1/7: Add library dired-du, Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du 9566755 2/7: Add command to update cache size for the marked files, Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du 32a0482 7/7: * .gitignore: New file, Stefan Monnier, 2020/12/01
- [elpa] externals/dired-du 81c46d7 4/7: Remove redundant nil keywords to define-minor-mode., Stefan Monnier, 2020/12/01