Path encryption works by encrypting the parent directory first, which leads to a lot of recursion in CryptoPathMapper. The function getCiphertextDir is called tens of thousands of times, as path encryption happens for virtually every single I/O operation:
First tests have shown, that there is a huge potential to speed up path encryption by an order of magnitude when we cache directory paths, which also affects dependend operations, such as readAttributes (~ 3x speed up).
Path encryption works by encrypting the parent directory first, which leads to a lot of recursion in
CryptoPathMapper
. The functiongetCiphertextDir
is called tens of thousands of times, as path encryption happens for virtually every single I/O operation:https://github.com/cryptomator/cryptofs/blob/28bc19a784242db7c77430edd766c03c8e5fdf0b/src/main/java/org/cryptomator/cryptofs/CryptoPathMapper.java#L134-L143
First tests have shown, that there is a huge potential to speed up path encryption by an order of magnitude when we cache directory paths, which also affects dependend operations, such as
readAttributes
(~ 3x speed up).