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

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

[elpa] externals/vlf 199209f 263/310: Fix vlf-tune-optimal-load with no


From: Stefan Monnier
Subject: [elpa] externals/vlf 199209f 263/310: Fix vlf-tune-optimal-load with no optional arguments supplied.
Date: Sat, 28 Nov 2020 00:33:28 -0500 (EST)

branch: externals/vlf
commit 199209fe1514d08d394a149a1d35a98763407d97
Author: Andrey Kotlarski <m00naticus@gmail.com>
Commit: Andrey Kotlarski <m00naticus@gmail.com>

    Fix vlf-tune-optimal-load with no optional arguments supplied.
---
 vlf-tune.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/vlf-tune.el b/vlf-tune.el
index 269c40a..575fb1f 100644
--- a/vlf-tune.el
+++ b/vlf-tune.el
@@ -376,11 +376,10 @@ Best considered where primitive operations total is 
closest to
 confine search to this region."
   (if vlf-tune-enabled
       (progn
-        (or max-idx
-            (setq max-idx (min max-idx
-                               (1- (/ (min vlf-tune-max
-                                           (/ (1+ vlf-file-size) 2))
-                                      vlf-tune-step)))))
+        (setq max-idx (min (or max-idx vlf-tune-max)
+                           (1- (/ (min vlf-tune-max
+                                       (/ (1+ vlf-file-size) 2))
+                                  vlf-tune-step))))
         (let* ((idx (max 0 (or min-idx 0)))
                (best-idx idx)
                (best-time-diff vlf-tune-load-time)



reply via email to

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