+3
−0
+3
−0
+50
−48
include/client/cache.hpp
0 → 100644
+137
−0
+1
−0
Loading
Resolve "Add dentry cache" This MR adds a directory entry cache for the client to avoid a huge number of stat calls after readdir, e.g., for `ls -l` type operations. It is experimental and thus disabled by default. Can be enabled via `include/config.hpp` or with the env variable `LIBGKFS_DENTRY_CACHE=ON/OFF`. It works by using the `extended_dir_entry` RPC to receive some metadata along the the dentries from the daemons. This metadata is then placed into the cache and retrieved in a stat operation (for a cache miss, an RPC is sent with vanilla functionality). The cache is discarded upon close but can be changed via `include/config.hpp`. Note, this may cause semantical issues (removed files will remain in the cache forever). The performance improvements are already noticeable locally for a couple 1000 files. Depends on !195 Closes #292 Closes #292 See merge request !194