)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f33416f65556be6625b397f00181bf08ebf29989","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This should be properly fixed by changing RouterInfo.internal_ports"},{"line_number":27,"context_line":"to be a dict instead of list of ports but such patch would be much"},{"line_number":28,"context_line":"bigger and (possibly) harded to backport to stable branches."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: I2e38457942518c8a3e07e606091bb6720317b77e"},{"line_number":31,"context_line":"Closes-Bug: #1813279"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9fdfeff1_81486687","line":28,"range":{"start_line":28,"start_character":22,"end_line":28,"end_character":28},"updated":"2019-02-07 15:20:06.000000000","message":"nit: harder","commit_id":"21cddc47b446fdfb5535b347c1d7825a04e02c62"}],"neutron/agent/l3/router_info.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"990fb36288744eb0c35608a2ca32cb82e522249a","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for p in self.internal_ports:"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                index \u003d self.internal_ports.index(p)"},{"line_number":496,"context_line":"                self.internal_ports[index] \u003d port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_0ab3cf99","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":36},"updated":"2019-01-29 12:36:19.000000000","message":"nit nit: because we are going through the list, to avoid the index search in L495, you can use enumerate(self.internal_ports)","commit_id":"c6e06a7883f368bca8ef0ab84652df551726e9e8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"df9fb0a57f66e1156c25f62e20d93527bdc756e5","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for p in self.internal_ports:"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                index \u003d self.internal_ports.index(p)"},{"line_number":496,"context_line":"                self.internal_ports[index] \u003d port"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_a96088d0","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":36},"in_reply_to":"9fdfeff1_0ab3cf99","updated":"2019-01-29 20:54:08.000000000","message":"Done","commit_id":"c6e06a7883f368bca8ef0ab84652df551726e9e8"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"4d6a1456858e7053b725cbc71bbd72d2cfd694c8","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_282ea891","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"updated":"2019-01-31 18:51:36.000000000","message":"Have you considered changing the \u0027internal_ports\u0027 from list to dict (with port_id as key). Then, we reduce from O(N) to O(1) in theory.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"88ee463f82c100c6a6b33fd58b52b3528025e5b6","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_55a9338d","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_029138f1","updated":"2019-02-01 16:52:21.000000000","message":"Yes, good idea and I will try to do that in this patch :)","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"ff13d46409db05e9d97b2232363c5cb1a94ba1d3","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_a4aaa56d","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_1fcdfd83","updated":"2019-02-03 15:35:37.000000000","message":"I think changing to a dict should be done in a follow-on so this is easily backported.  That said, I\u0027m not sure of the performance gain since there are typically not many ports in this list, it might not even be worth it.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2dc91f1883a86ca29bc1b7600875ef66d918c4b6","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_029138f1","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_282ea891","updated":"2019-02-01 10:59:59.000000000","message":"It\u0027s a good idea, but this implies several changes in this class. Maybe this is out of scope of this bug.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"aac929a3faafee06e9cc81c8dce4e3aa308cb666","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_d54d23c4","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_55a9338d","updated":"2019-02-01 17:07:44.000000000","message":"I\u0027m looking at it now and TBH I\u0027m not sure if it\u0027s worth to do it. There will be really lot of places where it has to be changed then and in fact performance improvement will not be very big as self.internal_ports usually don\u0027t contains many elements in this list.\nI would like to know opinion of others about that.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"f884822f25ab54676f6dfaac6654a95e50650428","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_1fcdfd83","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_d54d23c4","updated":"2019-02-02 17:31:19.000000000","message":"I think that this needs some comments about why you\u0027re adjusting the list (the commit message is good, but future code editors likely won\u0027t see it.)\n\nBonus points, converting to dict would be more readable than what\u0027s going on here, over and above any perf gains.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"9fc8db60ddc94fbd1ae5d3b7abc13c973944535a","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return [ip_dev.name for ip_dev in ip_devs]"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def _update_internal_ports_cache(self, port):"},{"line_number":493,"context_line":"        for index, p in enumerate(self.internal_ports):"},{"line_number":494,"context_line":"            if p[\u0027id\u0027] \u003d\u003d port[\u0027id\u0027]:"},{"line_number":495,"context_line":"                self.internal_ports[index] \u003d port"},{"line_number":496,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_cb001fae","line":493,"range":{"start_line":493,"start_character":39,"end_line":493,"end_character":53},"in_reply_to":"9fdfeff1_d54d23c4","updated":"2019-02-02 00:14:50.000000000","message":"OK. Never mind.","commit_id":"1e1b7282bc9d5b8de20e2942b085b525544ec8a4"}]}
