Closed yankee42 closed 3 years ago
@overheadhunter Indeed the lines you pointed out are the culprit. I noticed this myself also when running as a systemd service because in that case stdin is basically non-blocking. I fixed it for my use case by using a infinite locking with Object.lock(). The code is here: https://github.com/ndob/cli/tree/fix_cpu_usage
The other possible fix would be the one that we discussed earlier: blocking on the fuse mounts with the option you added to fuse-nio-adapter.
If you think the lock() approach is fine, I can make a pull request of my branch.
Since #33 has not made it into a release yet, I built cryptomator-cli myself from the current master. Then I mounted a vault like this:
This immediately generates 100% load on one of my eight cores and the CPU load stays at this level until I unmount the vault again, irrespective of actual file access.
Apart from that the vault works as expected. I can access/add files just fine.
This does not happen when mounting the vault with the GUI. In the later case CPU load is very low.