cybernoid / archivemount

A fuse filesystem for mounting archives in formats supported by libarchive.
Other
184 stars 19 forks source link

Cache archive directory index to file for faster future loads #4

Closed yuzeh closed 5 years ago

yuzeh commented 5 years ago

Hi!

From my understanding, one of the things that makes archivemount slow on archives with many files is that it has to read through the whole archive to create an index. Is there currently a way for the archivemount program to instead read the index from a file before loading?

If not, would this be a useful feature for this utility?

cybernoid commented 5 years ago

Hi, archivemount on start reads the information about all files and directories inside the archive using the functions provided by libarchive, which (at the time of writing archivemount, haven't checked it since then) only allowed scanning all entries as a flat list, one after the other. Archivemount then builds up a directory tree with the information, which is used for all later operations. Maybe scanning through the list every time instead would be more performant for the user (as long as he doesn't use "find", "ls -lR" or similar at least), but that would basically require a full rewrite of the tool and I have no time for that, sorry. Don't hesitate to go ahead and fork it if you want to!

yuzeh commented 5 years ago

@cybernoid thanks for the help!