logicminds/virt — comment on commit 179bf229daaa703fa3eb632a6bc4492fdad38ec3
File:  line 0
By logicminds:

The state is not vmware specific. Also each call to running adds a 20ms delay in retrieving that information each time. If you look at foreman it either directly or indirectly calls this running method about 10 times per guest. So when you add 20 guests to the equation your waiting a long time for something you have retrieved 9 times previously. It only makes sense to cache this value. If you want to compare on kvm I would time the data retrieval for all the guests with and without the cache.

Long delay because it must follow this path
virt-->libvirt-->host-->guest