)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"19b501aeacea7d56764ba2c98c5f1c54e099781a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove unused variable"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"TrivialFix"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I86aa6c52c86c1db8336692843c7f1030b70258c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a30ddce_962b00eb","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":10},"updated":"2017-03-08 13:21:08.000000000","message":"TrivialRefactoring?","commit_id":"5f3ae0763778dbefa3ba98fe11de613268e200f3"}],"glance/common/scripts/image_import/main.py":[{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"4283b0e0e29ab29091fc891ae76695dea453e696","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"},{"line_number":120,"context_line":"    _base_properties \u003d []"},{"line_number":121,"context_line":"    for k in v2_api.get_base_properties().keys():"},{"line_number":122,"context_line":"        _base_properties.append(k)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_f3ac69ef","line":121,"range":{"start_line":121,"start_character":41,"end_line":121,"end_character":49},"updated":"2017-03-01 15:09:59.000000000","message":"keys() is redundant here. \u0027for k in v2_api.get_base_properties()\u0027 does absolutely the same","commit_id":"716060a044176834be3419092f748e933bf4997f"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"49239480c6db434b84221b175fd52279300a73aa","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"},{"line_number":120,"context_line":"    _base_properties \u003d []"},{"line_number":121,"context_line":"    for k in v2_api.get_base_properties().keys():"},{"line_number":122,"context_line":"        _base_properties.append(k)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_d154af22","line":121,"range":{"start_line":121,"start_character":41,"end_line":121,"end_character":49},"in_reply_to":"ba2be162_855af84e","updated":"2017-03-08 07:36:00.000000000","message":"Hi!\nI think there are three options (results are the same, but the speed is different):\n  1) for k, v in v2_api.get_base_properties().items(): [...] - This is the slowest\n  2) for k in v2_api.get_base_properties().keys(): [...] - This is faster than the previous\n  3) for k in v2_api.get_base_properties(): [...] - This is the fastest","commit_id":"716060a044176834be3419092f748e933bf4997f"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"49239480c6db434b84221b175fd52279300a73aa","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"},{"line_number":120,"context_line":"    _base_properties \u003d []"},{"line_number":121,"context_line":"    for k in v2_api.get_base_properties().keys():"},{"line_number":122,"context_line":"        _base_properties.append(k)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_915a374f","line":121,"range":{"start_line":121,"start_character":41,"end_line":121,"end_character":49},"in_reply_to":"ba2be162_f3ac69ef","updated":"2017-03-08 07:36:00.000000000","message":"Hi!\nYou\u0027re right, thx!","commit_id":"716060a044176834be3419092f748e933bf4997f"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"7df72e3d36a411b63e5ef6927784497ee473d7b0","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"},{"line_number":120,"context_line":"    _base_properties \u003d []"},{"line_number":121,"context_line":"    for k in v2_api.get_base_properties().keys():"},{"line_number":122,"context_line":"        _base_properties.append(k)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    properties \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_855af84e","line":121,"range":{"start_line":121,"start_character":41,"end_line":121,"end_character":49},"in_reply_to":"ba2be162_f3ac69ef","updated":"2017-03-01 19:57:58.000000000","message":"yeah, I\u0027m not sure if we need to get rid of \"v\" here.\n\nyou can write this as\n\nfor k, _ in in v2_api.get_base_properties():\n\nare you seeing any performance degradation on this, the returned dictionary is not tiny and for 1000 req/sec it may matter?","commit_id":"716060a044176834be3419092f748e933bf4997f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"23e20e7b4ba5b5ea22567a2c114182651d48c586","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    properties \u003d {}"},{"line_number":125,"context_line":"    # NOTE: get the base properties"},{"line_number":126,"context_line":"    for key in _base_properties:"},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            properties[key] \u003d image_properties.pop(key)"},{"line_number":129,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f231b9d_17ff0fab","line":126,"range":{"start_line":126,"start_character":15,"end_line":126,"end_character":31},"updated":"2017-06-12 11:58:58.000000000","message":"IMO _base_properties itself is not required, we can directly loop here on v2_api.get_base_properties() and remove above loop completely.","commit_id":"5f3ae0763778dbefa3ba98fe11de613268e200f3"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"5fccf356d7bbe9933325c75a91b2f8c5a705c8e1","unresolved":false,"context_lines":[{"line_number":119,"context_line":"def create_image(image_repo, image_factory, image_properties, task_id):"},{"line_number":120,"context_line":"    properties \u003d {}"},{"line_number":121,"context_line":"    # NOTE: get the base properties"},{"line_number":122,"context_line":"    for key in v2_api.get_base_properties().keys():"},{"line_number":123,"context_line":"        try:"},{"line_number":124,"context_line":"            properties[key] \u003d image_properties.pop(key)"},{"line_number":125,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_05048716","line":122,"updated":"2017-06-21 08:19:50.000000000","message":"\u0027keys()\u0027 is not necessary here -  \n\"for key in v2_api.get_base_properties():\" is enough","commit_id":"487b90b8e76f1ee85352629a990a80b1548eb88c"}]}
