Code review comment for lp:~oif-team/geis/event-control-functions

Revision history for this message
Henrik Rydberg (rydberg) wrote :

On 12/13/2010 03:41 PM, Stephen M. Webb wrote:

>> There is a geis_event_attr_by_name(), but is there a way to retrieve the index corresponding to
>> the name?
>
> No, the GeisEvent is effectively an associative container of attributes

> and I am not aware of any associative container that provides such
> functionality. Is there a use case you're thinking of?

Attributes are being read in abundance in the inner event loop, so some cpu will
be used for the lookup. Since there are two lookup methods, it seems the mapping
between the two is missing, or did I misread something? Usecase-wise, I would
collect the indices of the attributes in question at init, and then use the
indices during event handling. But sure, things will still work as they are,
only less effectively.

Thanks!

« Back to merge proposal