summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2011-04-26 15:12:05 +0200
committerGravatar Andy Wingo2011-04-26 15:12:05 +0200
commit62a351d8d5c9bd28e2cb50e8ce1c34b67daa4981 (patch)
treec3312bba14ab91cd93816ae53070a5e650be151f
parentcee672f11721101ba3c03f8397691177a404c325 (diff)
downloadtekuti-62a351d8d5c9bd28e2cb50e8ce1c34b67daa4981.tar.gz
tekuti-62a351d8d5c9bd28e2cb50e8ce1c34b67daa4981.zip
optimization for with=foo
* tekuti/page.scm (page-feed-atom): Reduce "with=unknown" to nothing.
-rw-r--r--tekuti/page.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/tekuti/page.scm b/tekuti/page.scm
index 182ea02..17cafa8 100644
--- a/tekuti/page.scm
+++ b/tekuti/page.scm
@@ -347,9 +347,11 @@
(if (pair? with)
(fold (lambda (tag cont)
(let ((posts (hash-ref tags tag '())))
- (lambda (post)
- (or (member (post-key post) posts)
- (cont post)))))
+ (if (pair? posts)
+ (lambda (post)
+ (or (member (post-key post) posts)
+ (cont post)))
+ cont)))
(lambda (post) #f)
with)
(lambda (post) #t)))