summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar https://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web>2015-02-13 15:33:54 +0000
committerGravatar admin <admin@branchable.com>2015-02-13 15:33:54 +0000
commit43d2939ebb4b0a00db17cb6e39c85ed3f8dde2f9 (patch)
tree2d7b051c8a4c9128781a2695114b769c78a30d25 /doc
parentfe48a226d11160dbd8f50b7918adae0914e634bf (diff)
lookupkey = readlink $ basename?
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/optimising_lookupkey.mdwn5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/forum/optimising_lookupkey.mdwn b/doc/forum/optimising_lookupkey.mdwn
new file mode 100644
index 000000000..b8e4a0353
--- /dev/null
+++ b/doc/forum/optimising_lookupkey.mdwn
@@ -0,0 +1,5 @@
+to work around [[forum/original_filename_on_s3/]], i need to get the key from a file, and i'm not within the git-annex process. i know there's `git annex lookupkey $FILE`, but that incurs significant overhead because the whole git annex runtime needs to fire up. in my tests, this takes around 25ms on average.
+
+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?
+
+thanks. --[[anarcat]]