[Fusioninventory-devel] dubious 'fix'

Gonéri Le Bouder goneri at rulezlan.org
Sat Apr 30 19:56:38 UTC 2011


On Sat, Apr 30, 2011 at 06:16:52PM +0200, Guillaume Rousse wrote:
> commit f124ca1eff608b6a8dcc4ebb2cf1bc6b9e7a52d9
> Author: Gonéri Le Bouder <goneri at rulezlan.org>
> Date:   Thu Apr 28 16:43:28 2011 +0200
 
> This doesn't "fix" anything, this just log items with unknown attributes
> added to the inventory (which is indeed useful).
I got some key missing in the XML without error messages. That's the
reason why I changed the list to use to get the $field. I think the 
debug message is useful here. Think to it I had been able to spot some
issues.

> But this also change
> the semantic of the function, by allowing undefined values to slip in
> (they were filtered out previously by the removed line),
Yes I missed that.

> and this is
> considerably slower, by traversing the full list of allowed attributes
> for each attribute of each item added to the inventory...
> The correct way to conduct this kind of repeated lookup is to use an
> hash instead.
Yes, your patch 0dc5ed767789bb5ce3b27e2764e66cdc6b95059a is much better.

Best regards,

      Gonéri Le Bouder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/fusioninventory-devel/attachments/20110430/3555c8e7/attachment.pgp>


More information about the Fusioninventory-devel mailing list