Re: [libvirt] [PATCH 2/5] Convert virDomainObjListPtr to use a hash of domain objects

2009-10-15 Thread Matthias Bolte
2009/10/14 Daniel P. Berrange : > The current virDomainObjListPtr object stores domain objects in > an array. This means that to find a particular objects requires > O(n) time, and more critically acquiring O(n) mutex locks. > > The new impl replaces the array with a virHashTable, keyed off > UUID.

Re: [libvirt] [PATCH 2/5] Convert virDomainObjListPtr to use a hash of domain objects

2009-10-14 Thread Daniel Veillard
On Wed, Oct 14, 2009 at 03:16:19PM +0100, Daniel P. Berrange wrote: > On Wed, Oct 14, 2009 at 04:04:50PM +0200, Daniel Veillard wrote: > > On Wed, Oct 14, 2009 at 11:48:51AM +0100, Daniel P. Berrange wrote: > > So we went from list to array, and now to hash table :-) > > Yeah, I very much regret

Re: [libvirt] [PATCH 2/5] Convert virDomainObjListPtr to use a hash of domain objects

2009-10-14 Thread Daniel P. Berrange
On Wed, Oct 14, 2009 at 04:04:50PM +0200, Daniel Veillard wrote: > On Wed, Oct 14, 2009 at 11:48:51AM +0100, Daniel P. Berrange wrote: > > The current virDomainObjListPtr object stores domain objects in > > an array. This means that to find a particular objects requires > > O(n) time, and more crit

Re: [libvirt] [PATCH 2/5] Convert virDomainObjListPtr to use a hash of domain objects

2009-10-14 Thread Daniel Veillard
On Wed, Oct 14, 2009 at 11:48:51AM +0100, Daniel P. Berrange wrote: > The current virDomainObjListPtr object stores domain objects in > an array. This means that to find a particular objects requires > O(n) time, and more critically acquiring O(n) mutex locks. > > The new impl replaces the array w