On Wed, Mar 28, 2007 at 04:20:18PM +0100, Daniel P. Berrange wrote:
On Wed, Mar 28, 2007 at 11:10:38AM -0400, Daniel Veillard wrote:
> I was thinking about the upcoming remote support, and an RPC is expensive
> for this kind of informations IMHO.
The only way to avoid that overhead then would be to add an extra bit of
info to the virDomainPtr struct, which is populated at the time the virDomainPtr
object is allocated, so we can avoid calling back into the driver model.
Seems to me domain->flags bit DOMAIN_IS_DEFINED is the right place.
That would raise some troublesome cache invalidation issues on the
client
end, though I guess we've already got that issue with the ID value.
That could be refreshed each time
virConnectListDefinedDomains()
virDomainUndefine()
virNodeGetInfo()
virDomainCreate()
is called.
The exact same issue could be pointed out for DefinedNetworks, except I
would not expect the cost to really be an issue I would guess it's called
far less frequently, but I'm just guessing.
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/