]> arthur.barton.de Git - bup.git/commit
vfs: cache resolve() calls to improve (fuse) performance
authorRob Browning <rlb@defaultvalue.org>
Sun, 6 May 2018 16:46:45 +0000 (11:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 1 Jul 2018 18:16:26 +0000 (13:16 -0500)
commit2b27df29f67103f333f52a0888f89f589c5f135f
treec7a7a56360f02eafb5a6cd5ba46b3bb8f1f0701d
parentbb092f8a5c148534655b6a709896d853e3587dc8
vfs: cache resolve() calls to improve (fuse) performance

Include resolve() results in the vfs cache.  This substantially
improves fuse "cat somefile" performance.  (Observed a ~2x rate
improvement with a 500MB urandom file).

This appears to be due to the fact that fuse read(path, offset, len)
is called many times for the file, resulting in many corresponding,
redundant resolve(path) calls.

The previous fuse implementation, based on the previous vfs had its
own cache, but moving the caching to the vfs should be more generally
helpful.

Now bup fuse will again ignore repository changes that affect paths it
has already examined.  This matches its behavior in the current stable
release (0.29.1).

Thanks to voldial for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs.py
t/test-fuse.sh