From 3bb00d142a4d31316fc6f0eb1277aa2fafe4dbe9 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@gnu.kitenet.net>
Date: Thu, 8 Oct 2009 20:27:56 -0400
Subject: Optimize away most expensive file prune calls, when refreshing

Benchmarking refresh of a a wiki with 25 thousand pages showed
file_pruned() using most of the time. But, when refreshing, ikiwiki already
knows about nearly all the files. So we can skip calling file_pruned() for
those it knows about. While tricky to do, this sped up a refresh (that
otherwise does no work) by 10-50%.
---
 debian/changelog | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'debian')

diff --git a/debian/changelog b/debian/changelog
index ca5409af7..6c4353065 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low
   * mirrorlist: Display nothing if list is empty.
   * Fix a bug that could lead to duplicate links being recorded
     for tags.
+  * Optimize away most expensive file prune calls, when refreshing,
+    by only checking new files.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 27 Sep 2009 17:40:03 -0400
 
-- 
cgit v1.2.3