ssorj commented on a change in pull request #626: DISPATCH-1491: use sets rather than iterating over lists URL: https://github.com/apache/qpid-dispatch/pull/626#discussion_r349259484
########## File path: python/qpid_dispatch_internal/router/mobile.py ########## @@ -54,43 +54,44 @@ def tick(self, now): if len(self.added_addrs) > 0 or len(self.deleted_addrs) > 0: self.mobile_seq += 1 hints = [self.treatments[a] for a in self.added_addrs] - msg = MessageMAU(None, self.id, self.mobile_seq, self.added_addrs, self.deleted_addrs, _hints=hints) + msg = MessageMAU(None, self.id, self.mobile_seq, list(self.added_addrs), list(self.deleted_addrs), _hints=hints) self.sent_deltas[self.mobile_seq] = msg if len(self.sent_deltas) > MAX_KEPT_DELTAS: self.sent_deltas.pop(self.mobile_seq - MAX_KEPT_DELTAS) self.container.send('amqp:/_topo/0/all/qdrouter.ma', msg) self.container.log_ma(LOG_TRACE, "SENT: %r" % msg) - self.local_addrs.extend(self.added_addrs) + for addr in self.added_addrs: Review comment: I tried this out for fun: https://gist.github.com/ssorj/fe624ab4b3840db34d9ebbff5f04cb6b ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org