commit 05431fe6459078dbc63419ba84a20f51e09107bb
parent 1fcc55a48de7e7aa1e43ec87756328e80982c10d
Author: GSI2016 <2016@groovy-skills.com>
Date: Tue, 21 Jun 2016 23:05:44 +0200
replaced md5 logic by using current time with nanoseconds (refs #20)
This strongly improves performance for clipmenud.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clipmenud b/clipmenud
@@ -48,9 +48,7 @@ while sleep "${CLIPMENUD_SLEEP:-0.5}"; do
rm -- "${last_filename[$selection]}"
fi
- md5=$(md5sum <<< "$data")
- md5=${md5%% *}
- filename="$cache_dir/$(LC_ALL=C date +%F-%H-%M-%S)-$md5"
+ filename="$cache_dir/$(LC_ALL=C date +%F-%T.%N)"
last_data[$selection]=$data
last_filename[$selection]=$filename