Closed JuniorJPDJ closed 4 years ago
I may be wrong with exact lines, but there's an example of this running.
Only thing I did is mount ZipROFS (up-right corner), feedback is visible in debug view of remote fs (up-left corner) and bmon showing network usage.
When it will finish I'll show example on ls
of directory.
Even better - it's even on list of directory below this one ;o EDIT: Nevermind, just ZSH called list on this directory anyway.
There's video showing my issue: https://pixeldrain.com/u/PxBckYGJ
This reads happen because shell calls getattr on every node in the listing, not because of the listing itself.
I added a shortcut to not check files that don't have .zip extension. I'm reluctant to completely remove the iz_zipfile() but I could probably make it an option.
The only solution which could make it better that comes to my mind is also caching is_zipfile()
return values.
Fixed in #4
I'm trying to use this project on remote filesystem, which is pretty slow. My worst case directory has over 4k files, where like 2k are ZIPs. Problem is that ZipROFS tries opening EVERY file from that directory on EVERY listing of directory. Probably problem is in this line: https://github.com/openscopeproject/ZipROFS/blob/dev/ziprofs.py#L75 This call is not cached and it's reading file on every listing with this line https://github.com/openscopeproject/ZipROFS/blob/dev/ziprofs.py#L134 This makes my first dir listing call take +-5 minutes, which is not acceptable ;/