lookupkey = readlink $ basename?
This commit is contained in:
parent
6f7e4146ee
commit
84c70b61f0
1 changed files with 5 additions and 0 deletions
5
doc/forum/optimising_lookupkey.mdwn
Normal file
5
doc/forum/optimising_lookupkey.mdwn
Normal file
|
@ -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]]
|
Loading…
Reference in a new issue