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

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

[elpa] externals/tmr 711616ea75 4/4: Optimize tabulated refreshing


From: ELPA Syncer
Subject: [elpa] externals/tmr 711616ea75 4/4: Optimize tabulated refreshing
Date: Tue, 28 Jun 2022 04:58:03 -0400 (EDT)

branch: externals/tmr
commit 711616ea7588cf7b260a49ede9ac081dbca953b6
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Optimize tabulated refreshing
    
    This should reduce the memory allocations and hopefully
    improve the negative side effects of the refreshing (point movement etc)
---
 tmr-tabulated.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index 8dad902646..9566e11675 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -89,7 +89,10 @@
                         (if-let (win (get-buffer-window))
                             (with-selected-window win
                               (let ((end (eobp)))
-                                (revert-buffer)
+                                ;; Optimized refreshing
+                                (dolist (entry tabulated-list-entries)
+                                  (setf (aref (cadr entry) 2) 
(tmr--format-remaining (car entry))))
+                                (tabulated-list-print t t)
                                 (when end
                                   (goto-char (point-max))))
                               ;; HACK: For some reason the hl-line 
highlighting gets lost here



reply via email to

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