From 21dcc992212acd53498bcfef8ade4bac01015e0d Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Fri, 13 Feb 2015 16:09:18 +0000 Subject: [PATCH] add extra question about cat-file vs find --- doc/forum/optimising_lookupkey.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/forum/optimising_lookupkey.mdwn b/doc/forum/optimising_lookupkey.mdwn index b8e4a0353f..5a7da73839 100644 --- a/doc/forum/optimising_lookupkey.mdwn +++ b/doc/forum/optimising_lookupkey.mdwn @@ -2,4 +2,12 @@ to work around [[forum/original_filename_on_s3/]], i need to get the key from a could i optimise this by simply doing a `readlink` call on the git checkout? it sure looks like `readlink | basename` is all I really need, and that can probably be done below 10ms (4ms in my tests). how reliable are those links anyways, and is that what lookupkey does? +similarly, i wonder if it's safe to bypass git-annex and talk straight with git to extract location tracking? i can jump from 90ms to below 10ms for such requests if I turn `git annex find ` into the convoluted: + +
+git annex lookupkey $file
+printf $key | md5sum
+git cat-file -p refs/heads/git-annex:$hash/${key}.log
+
+ thanks. --[[anarcat]]