anoadragon453 / qubes-file-trust

Service files and daemon for file-based trust levels on QubesOS
3 stars 3 forks source link

Batch marking files untrusted is slow due to gnome attribute setting #9

Open anoadragon453 opened 7 years ago

anoadragon453 commented 7 years ago

Ever since file emblems were set from qvm-file-trust it has been slow to batch-mark files (as well as takes up quite a lot of CPU).

Need to either do this in a non-blocking way, or see if there is a way to batch run gvfs-set-attribute. Maybe using xargs again?

anoadragon453 commented 7 years ago

Even using a multiprocessing pool still results in a 4.2x slowdown when setting visual attributes.

Perhaps we should make the emblem setting non-default? Then again, it's unlikely people will have thousands and thousands of untrusted files (I'm currently testing with ~80,000 files).

With this many files and visual attributes, it takes ~1m to mark 80,000 files. Without visual attributes it takes about ~34s.

Problem is, it has to do it every time the VM starts. Thoughts @jpouellet @marmarek ?