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

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

[elpa] externals/vlf a7be713 283/310: Set vlf-tune-max with proper value


From: Stefan Monnier
Subject: [elpa] externals/vlf a7be713 283/310: Set vlf-tune-max with proper value in case RAM size is wrongly
Date: Sat, 28 Nov 2020 00:33:32 -0500 (EST)

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

    Set vlf-tune-max with proper value in case RAM size is wrongly
    determined.
---
 vlf-tune.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/vlf-tune.el b/vlf-tune.el
index 9fbc3d7..a17cbc8 100644
--- a/vlf-tune.el
+++ b/vlf-tune.el
@@ -56,10 +56,11 @@ but don't change batch size.  If t, measure and change."
             (* 1000 (string-to-number (substring free match-from
                                                  (match-end 0))))))))
 
-(defcustom vlf-tune-max (let ((ram-size (vlf-tune-ram-size)))
-                          (if ram-size
-                              (/ ram-size 20)
-                            large-file-warning-threshold))
+(defcustom vlf-tune-max (max (let ((ram-size (vlf-tune-ram-size)))
+                               (if ram-size
+                                   (/ ram-size 20)
+                                 0))
+                             large-file-warning-threshold)
   "Maximum batch size in bytes when auto tuning.
 Avoid increasing this after opening file with VLF."
   :group 'vlf :type 'integer)



reply via email to

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