cryfs
cryfs copied to clipboard
Thunar very slow
Expected Behavior
1 - 3 seconds to open a folder for browsing from cloud storage
Actual Behavior
Time varies, but many times initial click on mounted folder opening takes 1.5 - 3.0 minutes. Once open, browsing time varies from 1 second to 45 seconds to open folders inside the mounted folder. Mounted folder size is 1G and other folders between 70M and 200M, but the time to open a folder is not tied to the folder size. Sometimes large folds open quick (2 sec) and sometimes small folder open slow (45 sec). I have tried on pCloud and Google Drive with similar results.
However, browsing via the terminal command line is quick like expected, 1 - 2 seconds to open initial folder, browse other folders and access files
Steps to Reproduce the Problem
- Mount encrypted folder from system running XFCE4 with Thunar FM
- Click to open folder
- Wait...
Specifications
- CryFS Version: 0.10.2-2
- Operating System (incl. Version): Arch, kernel 5.9.14
- XVCE4 4.14.3-1
- Thunar: 1.8.16-1
By " I have tried on pCloud and Google Drive with similar results." do you mean that the encrypted content is in a remote host, on a network filesystem?
I think I see your problem here. When you access through thunar (as opposed as navigating through the terminal), it is loading the contents of some files in order to show you previews (images, pdfs...). This would normally be only done for local disks (known to be fast), but is probably getting confused by the cryfs mount. You could probably classify the difference between the fast and slow folders depending on the types of files they contain in addition to the number (this may also depend on what is supported by your Thumbnailer).
Thunar has an option for this on Edit → Preferences → Display named Show thumbnails (Never / Local Files Only / Always). If my suspicion is correct, changing that to never should solve the slowness (at the cost of not getting thumbnails, of course).
Using a remote filesystem will be slower, and adding a layer like cryfs will add more roundtrips (e.g. to get the metadata for each file). Yet, by disabling the thumbnailing I expect you would be able to get a speed similar to doing a ls -l on that folder.