{"action":"created","issue":{"url":"https://api.github.com/repos/webcompat/webcompat.com/issues/1051","repository_url":"https://api.github.com/repos/webcompat/webcompat.com","labels_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/1051/labels{/name}","comments_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/1051/comments","events_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/1051/events","html_url":"https://github.com/webcompat/webcompat.com/issues/1051","id":155622030,"number":1051,"title":"Optimizing images on upload is too slow","user":{"login":"miketaylr","id":67283,"avatar_url":"https://avatars.githubusercontent.com/u/67283?v=3","gravatar_id":"","url":"https://api.github.com/users/miketaylr","html_url":"https://github.com/miketaylr","followers_url":"https://api.github.com/users/miketaylr/followers","following_url":"https://api.github.com/users/miketaylr/following{/other_user}","gists_url":"https://api.github.com/users/miketaylr/gists{/gist_id}","starred_url":"https://api.github.com/users/miketaylr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketaylr/subscriptions","organizations_url":"https://api.github.com/users/miketaylr/orgs","repos_url":"https://api.github.com/users/miketaylr/repos","events_url":"https://api.github.com/users/miketaylr/events{/privacy}","received_events_url":"https://api.github.com/users/miketaylr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-18T23:12:02Z","updated_at":"2016-05-19T01:55:32Z","closed_at":null,"body":"Pillow's optimization is slow. :(\r\n\r\nI need to measure more but right now local full-size screenshots are taking forever:\r\n\r\n`save function took 20237.716 ms`\r\nCommenting out the following block in upload.py:\r\n\r\n```\r\n# if self.image_object.format in ['JPEG', 'JPG', 'JPE', 'PNG']:\r\n        #     save_parameters['optimize'] = False\r\n        # # If animated GIF, aka duration > 0, add save_all parameter\r\n        # if (self.image_object.format == 'GIF' and\r\n        #    self.image_object.info['duration'] > 0):\r\n        #         save_parameters['save_all'] = False\r\n```\r\n\r\n`save function took 1704.766 ms`\r\n\r\ncc @karlcow "},"comment":{"url":"https://api.github.com/repos/webcompat/webcompat.com/issues/comments/220208025","html_url":"https://github.com/webcompat/webcompat.com/issues/1051#issuecomment-220208025","issue_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/1051","id":220208025,"user":{"login":"karlcow","id":505230,"avatar_url":"https://avatars.githubusercontent.com/u/505230?v=3","gravatar_id":"","url":"https://api.github.com/users/karlcow","html_url":"https://github.com/karlcow","followers_url":"https://api.github.com/users/karlcow/followers","following_url":"https://api.github.com/users/karlcow/following{/other_user}","gists_url":"https://api.github.com/users/karlcow/gists{/gist_id}","starred_url":"https://api.github.com/users/karlcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlcow/subscriptions","organizations_url":"https://api.github.com/users/karlcow/orgs","repos_url":"https://api.github.com/users/karlcow/repos","events_url":"https://api.github.com/users/karlcow/events{/privacy}","received_events_url":"https://api.github.com/users/karlcow/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T01:55:32Z","updated_at":"2016-05-19T01:55:32Z","body":"I wonder if you had issues with PNG images\r\n\r\nThis discussion is useful.\r\nhttps://github.com/python-pillow/Pillow/issues/1211\r\n\r\n\r\nSpecifically the `compress_level=<value>`"}}