ref: 9aea179273e771eecc4b6cc436806595ab0a72d9
parent: b0a7f79250054a4ebf6963a0aba78c8c86832f88
author: uriel <[email protected]>
date: Mon Jun 1 03:00:11 EDT 2009
Optimization: avoid using a temporary file to calculate the hash in md_handler.
--- a/bin/corehandlers.rc
+++ b/bin/corehandlers.rc
@@ -47,7 +47,7 @@
echo '</ul>'
}
-fn md_handler { $formatter < $1 }
+fn md_handler { $formatter $1 }
fn tpl_handler { template $* }
--- a/bin/fltr_cache.rc
+++ b/bin/fltr_cache.rc
@@ -19,8 +19,10 @@
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