tmfs
tmfs copied to clipboard
WIP: Improve performance
I needed to use tmfs to extract about 150GiB of data from a time machine backup. While that worked, it was unbearably slow. Looking at the code there were a bunch of "low-hanging fruit".
I'll leave this as a draft for discussion, probably it would be good to clean this up a bit more and split the pure refactorings (such as using fs::path/std::string and the file renamings) from the more functional parts.
- Use more consistent typing on the C++ side: paths are fs::path, strings are std::string
- Implement FUSE open/release and avoid opening/closing the file for each read call (as well as the expensive get_real_path!)
- Implement FUS opendir/releasedir
- Reduce the number of directories that need to be lstat-ed when using readdir by remembering the real path of the root.
Also: Thanks for this tool! I was a bit concerned how to unfurl my backup (old long-gone computer!)
Hi, I don't have test data at hand, when you feel like your PR is ready and tested I'll merge it. Thanks :+1: