On Jun 13, 1:14 pm, caribou <[email protected]> wrote: > When > dispatching by browsing a dictionary containing my objects that's a > lot better, what makes the pyglet dispatcher slower ?
Each object that subscribes to an event push_handlers(on_test) gets fired in sequential order if the event happens until one handler cancels it. If you need to possibly dispatch an event to an unknown (but large) quantity of objects, you can employ strategies to quickly cut down on candidates. - By using spatial ordering and elimination (for instance in GUIs where events are routed in a tree) - By type-dispatch and similar techniques (divide and conquer your event handlers) - By rule-based dispatch schemes that evaluate a predicate of the event to arrive at a set of suitable handlers (a more generic form of type dispatch) -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
