tmfs icon indicating copy to clipboard operation
tmfs copied to clipboard

WIP: Improve performance

Open ankon opened this issue 1 year ago • 2 comments

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.

ankon avatar Mar 12 '24 09:03 ankon

Also: Thanks for this tool! I was a bit concerned how to unfurl my backup (old long-gone computer!)

ankon avatar Mar 12 '24 09:03 ankon

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:

abique avatar Mar 12 '24 09:03 abique