Since I started using Qubes 1-2 years ago, one thing that was very noticeable was the time it took for the qvm-pci command to run, without arguments. More than 1 minute.
I use a high-end desktop, so I don’t think it’s a resource issue. I’m guessing it’s a side effect of how it is implemented? And maybe exacerbated in my case by the 6 PCI cards I have, and the 15-20 PCI devices (m.2 and u.2 drives being PCI devices is what makes that number so large for my case, lots of disks)
I don’t run it that often, but when I do, I often need to run it several times, which makes the slowness stand out
I’m not sure that it’s worth any developer time to fix, but if anyone has the time and familiarity to confirm it’s expected behavior, that would be good to know
That’s the most probable issue. I think (don’t quote me on this) that qvm-pci and qvm-usb do device discovery sequentially and synchronously, which gets really slow with many devices. While I haven’t experienced your issue specifically, I have a very similar one with qvm-usb, as I usually have a lot of devices plugged in and executing the command can take dozens of seconds.
It may be worth to make an issue on the issue tracker about this, if there isn’t one already.
Another one that’s unexpectedly slow is setting or deleting tags on some VM…even in a python script that goes directly to the Qubes libraries it can take a second to do it. I have one place where I set two tags and delete a third and that adds up to something noticeable (and no way in the interface to do them all at once).