Jay Gagnon wrote:
Kaitlin Rupert wrote:
> Jay Gagnon wrote:
>> }
>>
>> + for (i = 0; i < prev_count; i++) {
>> + res = dom_changed(prev_xml[i], cur_xml,
>> cur_count);
>> + if (res) {
>> + CU_DEBUG("Domain '%s'
modified.",
>> prev_xml[i].uuid);
>> + mod_ind(context, conn, prev_xml[i],
>> prefix, ns);
>> + }
>> + free_dom_xml(prev_xml[i]);
>> + }
> Would it be worth while to add the contents of this loop with delete
> indication loop just above?
>
> for (i = 0; i < prev_count; i++) {
> //Handle delete indication
> }
>
> This would prevent us from looping through another time. However, it
> might make the loop too complex / hard to read...
>
>
I think with that one I'd fall on the "makes the loop more complex" side
of things. If it saved us from hitting libvirt an additional time or
something like that it would be worth it, but I think the total cycles
saved will be pretty small and I like how each indication has a distinct
section right now.
Sure that makes sense and is fine by me.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com