{"action":"created","issue":{"url":"https://api.github.com/repos/theupdateframework/tuf/issues/338","repository_url":"https://api.github.com/repos/theupdateframework/tuf","labels_url":"https://api.github.com/repos/theupdateframework/tuf/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/theupdateframework/tuf/issues/338/comments","events_url":"https://api.github.com/repos/theupdateframework/tuf/issues/338/events","html_url":"https://github.com/theupdateframework/tuf/issues/338","id":162531673,"number":338,"title":"high cpu usage on download","user":{"login":"julianhille","id":741067,"avatar_url":"https://avatars.githubusercontent.com/u/741067?v=3","gravatar_id":"","url":"https://api.github.com/users/julianhille","html_url":"https://github.com/julianhille","followers_url":"https://api.github.com/users/julianhille/followers","following_url":"https://api.github.com/users/julianhille/following{/other_user}","gists_url":"https://api.github.com/users/julianhille/gists{/gist_id}","starred_url":"https://api.github.com/users/julianhille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianhille/subscriptions","organizations_url":"https://api.github.com/users/julianhille/orgs","repos_url":"https://api.github.com/users/julianhille/repos","events_url":"https://api.github.com/users/julianhille/events{/privacy}","received_events_url":"https://api.github.com/users/julianhille/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-27T19:42:19Z","updated_at":"2016-06-27T21:14:29Z","closed_at":null,"body":"Im trying to have tuf on a device which is not very powerful.\r\nIt is an arm v7 with max 1ghz.\r\n\r\nThe cpu load was very high for the time the repository updates i found the cause to be the downloading while loop.\r\n\r\nNormal update of a repository with one mirror. And nothing to update.\r\n\r\n```\r\nreal\t0m13.169s\r\nuser\t0m9.796s\r\nsys\t0m0.600s\r\n```\r\n\r\nAfter adding [here](https://github.com/theupdateframework/tuf/blob/develop/tuf/download.py#L318) \r\n    \r\n    time.sleep(0.05)\r\n\r\nThe time where nearly the same but my CPU had enough power to process other things.\r\n\r\n\r\n```\r\nreal\t0m13.686s\r\nuser\t0m2.840s\r\nsys\t0m0.352s\r\n```"},"comment":{"url":"https://api.github.com/repos/theupdateframework/tuf/issues/comments/228877591","html_url":"https://github.com/theupdateframework/tuf/issues/338#issuecomment-228877591","issue_url":"https://api.github.com/repos/theupdateframework/tuf/issues/338","id":228877591,"user":{"login":"vladimir-v-diaz","id":3520883,"avatar_url":"https://avatars.githubusercontent.com/u/3520883?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimir-v-diaz","html_url":"https://github.com/vladimir-v-diaz","followers_url":"https://api.github.com/users/vladimir-v-diaz/followers","following_url":"https://api.github.com/users/vladimir-v-diaz/following{/other_user}","gists_url":"https://api.github.com/users/vladimir-v-diaz/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimir-v-diaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimir-v-diaz/subscriptions","organizations_url":"https://api.github.com/users/vladimir-v-diaz/orgs","repos_url":"https://api.github.com/users/vladimir-v-diaz/repos","events_url":"https://api.github.com/users/vladimir-v-diaz/events{/privacy}","received_events_url":"https://api.github.com/users/vladimir-v-diaz/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T21:14:29Z","updated_at":"2016-06-27T21:14:29Z","body":"I'll take a closer look and try to determine why that while loop might be slow.\r\nI tested an update example on my machine (Intel® Core™ i5-4210U CPU @ 1.70GHz × 4 ) and got the following times:\r\n\r\n> real\t0m3.166s\r\n> user\t0m3.142s\r\n> sys\t0m0.024s\r\n\r\nHowever, I used [this](https://github.com/vladimir-v-diaz/tuf/tree/keyids_multihash_algorithms/tests/repository_data/repository/metadata) repository.  My client script performed a refresh() of top-level metadata (only timestamp.json was downloaded, verified, and found to be up to date).\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"vladimir-v-diaz"}}