[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/gnus-select2 fe89760 4/4: Speed up marking read messages in nnse
From: |
Andrew G Cohen |
Subject: |
feature/gnus-select2 fe89760 4/4: Speed up marking read messages in nnselect |
Date: |
Thu, 31 Oct 2019 06:59:29 -0400 (EDT) |
branch: feature/gnus-select2
commit fe89760bc71a08cb3d708774e4ad42f763384d98
Author: Andrew G Cohen <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Speed up marking read messages in nnselect
* lisp/gnus/nnselect.el (nnselect-request-update-info): Update the
list of read messages by excluding the unread ones. Since the
list of unread messages is usually shorter than the read list, this
speeds things up significantly.
---
lisp/gnus/nnselect.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index 422d786..8f5cace 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -493,7 +493,9 @@ If this variable is nil, or if the provided function
returns nil,
(artids (cl-sort nartids '< :key 'car))
(group-info (gnus-get-info artgroup))
(marks (gnus-info-marks group-info))
- (read (gnus-uncompress-sequence (gnus-info-read group-info))))
+ (unread (gnus-uncompress-sequence
+ (gnus-range-difference (gnus-active artgroup)
+ (gnus-info-read group-info)))))
(gnus-atomic-progn
(gnus-info-set-read
info
@@ -502,7 +504,7 @@ If this variable is nil, or if the provided function
returns nil,
(delq nil
(mapcar
#'(lambda (art)
- (when (memq (cdr art) read) (car art)))
+ (unless (memq (cdr art) unread) (car art)))
artids))))
(pcase-dolist (`(,type . ,range) marks)
(setq range (gnus-uncompress-sequence range))