[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104216: registry.el (prune-factor):
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104216: registry.el (prune-factor): New initialization parameter defaulting to 0.1. |
Date: |
Fri, 13 May 2011 04:12:37 +0000 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104216
author: Teodor Zlatanov <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2011-05-13 04:12:37 +0000
message:
registry.el (prune-factor): New initialization parameter defaulting to 0.1.
(registry-prune-hard): Use it.
gnus-registry.el (gnus-registry-fixup-registry): Set prune-factor to 0.1
expicitly.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-registry.el
lisp/gnus/registry.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-05-13 02:10:17 +0000
+++ b/lisp/gnus/ChangeLog 2011-05-13 04:12:37 +0000
@@ -1,3 +1,12 @@
+2011-05-13 Teodor Zlatanov <address@hidden>
+
+ * registry.el (prune-factor): New initialization parameter defaulting
+ to 0.1.
+ (registry-prune-hard): Use it.
+
+ * gnus-registry.el (gnus-registry-fixup-registry): Set prune-factor to
+ 0.1 expicitly.
+
2011-05-13 Glenn Morris <address@hidden>
* message.el (message-send-mail-with-sendmail): Assume sendmail-program
=== modified file 'lisp/gnus/gnus-registry.el'
--- a/lisp/gnus/gnus-registry.el 2011-05-09 22:27:17 +0000
+++ b/lisp/gnus/gnus-registry.el 2011-05-13 04:12:37 +0000
@@ -244,6 +244,8 @@
(oset db :max-hard
(or gnus-registry-max-entries
most-positive-fixnum))
+ (oset db :prune-factor
+ 0.1)
(oset db :max-soft
(or gnus-registry-max-pruned-entries
most-positive-fixnum))
=== modified file 'lisp/gnus/registry.el'
--- a/lisp/gnus/registry.el 2011-05-11 22:12:27 +0000
+++ b/lisp/gnus/registry.el 2011-05-13 04:12:37 +0000
@@ -116,6 +116,12 @@
:type integer
:custom integer
:documentation "Prune as much as possible to get to this size.")
+ (prune-factor
+ :initarg :prune-factor
+ :initform 0.1
+ :type float
+ :custom float
+ :documentation "At the max-hard limit, prune size * this entries.")
(tracked :initarg :tracked
:initform nil
:type t
@@ -357,11 +363,12 @@
(defmethod registry-prune-hard-candidates ((db registry-db))
"Collects pruning candidates from the registry-db object THIS.
-Proposes any entries over the max-hard limit minus 10."
+Proposes any entries over the max-hard limit minus size * prune-factor."
(let* ((data (oref db :data))
- ;; prune to 10 below the max-hard limit so we're not
- ;; pruning all the time
- (limit (- (oref db :max-hard) 10))
+ ;; prune to (size * prune-factor) below the max-hard limit so
+ ;; we're not pruning all the time
+ (limit (max 0 (- (oref db :max-hard)
+ (* (registry-size db) (oref db :prune-factor)))))
(candidates (loop for k being the hash-keys of data
collect k)))
(list limit candidates))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104216: registry.el (prune-factor): New initialization parameter defaulting to 0.1.,
Katsumi Yamaoka <=