On 10/05/2015 12:31 PM, David Lutterkort wrote:
With your suggested query implemented in netcf:
so nearly identical to the timing when I *removed that query completely*!
I would say that 60x better performance looks impressive to anyone :-). Especially since:
1) The number of users with this many host interfaces is very small, and
2) upstream virt-manager becomes usable as soon as it has the list of all interface names is returned (which now takes 2sec rather than 1m37s), with the remaining 15 sec simply consuming one CPU core while the user goes merrily on their way.
So I think this much improvement is good enough for now. (It would be nice if aug_load() could take advantage of inotify or something similar to avoid the large overhead of checking all files' mtimes though - even though it works in practice, I'm still not comfortable with the idea that we could occasionally have information that is up to 1 second out of date, as this could lead to race conditions if some other entity is modifying the config on disk directly.)
Thanks for all your help with this. The resulting improvement has been *much* better than I ever expected.
(BTW - please feel free to review/ACK the netcf patch that I posted to netcf-devel yesterday :-); you surely know the details behind it better than anyone else, and I posted it mainly so that you could verify I am implementing what you said. (Note that your current address has been whitelisted, so you don't need to subscribe)