commit 5423176a361d5a6df20b3fc29977236238939a56
parent aec7e290aff439f39553bc8729edd4e2dbeb9708
Author: uriel@vm41.cat-v.org <unknown>
Date: Mon, 1 Jun 2009 07:00:11 +0200
Optimization: avoid using a temporary file to calculate the hash in md_handler.
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/corehandlers.rc b/bin/corehandlers.rc
@@ -47,7 +47,7 @@ fn link_bar {
echo '</ul>'
}
-fn md_handler { $formatter < $1 }
+fn md_handler { $formatter $1 }
fn tpl_handler { template $* }
diff --git a/bin/fltr_cache.rc b/bin/fltr_cache.rc
@@ -19,8 +19,10 @@ fn fltr_cache {
a=$f
f=/dev/null
}
- if not
+ if not {
score=`{sha1sum $f || exit 1}
+ score=$score(1)
+ }
}
cachedir=/tmp/fltr_cache/$score
mkdir -p $cachedir >[2]/dev/null