{"action":"created","issue":{"url":"https://api.github.com/repos/tqdm/tqdm/issues/65","labels_url":"https://api.github.com/repos/tqdm/tqdm/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/tqdm/tqdm/issues/65/comments","events_url":"https://api.github.com/repos/tqdm/tqdm/issues/65/events","html_url":"https://github.com/tqdm/tqdm/issues/65","id":120020920,"number":65,"title":"Asynchronous tqdm","user":{"login":"lrq3000","id":1118942,"avatar_url":"https://avatars.githubusercontent.com/u/1118942?v=3","gravatar_id":"","url":"https://api.github.com/users/lrq3000","html_url":"https://github.com/lrq3000","followers_url":"https://api.github.com/users/lrq3000/followers","following_url":"https://api.github.com/users/lrq3000/following{/other_user}","gists_url":"https://api.github.com/users/lrq3000/gists{/gist_id}","starred_url":"https://api.github.com/users/lrq3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrq3000/subscriptions","organizations_url":"https://api.github.com/users/lrq3000/orgs","repos_url":"https://api.github.com/users/lrq3000/repos","events_url":"https://api.github.com/users/lrq3000/events{/privacy}","received_events_url":"https://api.github.com/users/lrq3000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tqdm/tqdm/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/tqdm/tqdm/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-02T19:45:56Z","updated_at":"2016-01-19T22:21:30Z","closed_at":null,"body":"From Python 3.4, the stdlib provides an asynchronous decorator. Maybe this can be used to make tqdm asynchronous, thus lowering even further the overhead?\r\n\r\nEg,\r\n```\r\ntry:\r\n    from asyncio import coroutine\r\nexcept ImportError:\r\n    def coroutine(func):\r\n        return func\r\n```\r\n\r\nFrom the excellent [ipy_progressbar module](https://github.com/aplavin/ipy-progressbar/blob/ipy2/ipy_progressbar/base.py).\r\n\r\nAlso, it's interesting to note that they used a `deque(maxlen=100)` to memorize all 100 previous `delta_t` to compute their eta. This is I think quite efficient (but not as efficient as us), and it can be a useful trick for us if we want to implement more complex etas."},"comment":{"url":"https://api.github.com/repos/tqdm/tqdm/issues/comments/173006861","html_url":"https://github.com/tqdm/tqdm/issues/65#issuecomment-173006861","issue_url":"https://api.github.com/repos/tqdm/tqdm/issues/65","id":173006861,"user":{"login":"lrq3000","id":1118942,"avatar_url":"https://avatars.githubusercontent.com/u/1118942?v=3","gravatar_id":"","url":"https://api.github.com/users/lrq3000","html_url":"https://github.com/lrq3000","followers_url":"https://api.github.com/users/lrq3000/followers","following_url":"https://api.github.com/users/lrq3000/following{/other_user}","gists_url":"https://api.github.com/users/lrq3000/gists{/gist_id}","starred_url":"https://api.github.com/users/lrq3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrq3000/subscriptions","organizations_url":"https://api.github.com/users/lrq3000/orgs","repos_url":"https://api.github.com/users/lrq3000/repos","events_url":"https://api.github.com/users/lrq3000/events{/privacy}","received_events_url":"https://api.github.com/users/lrq3000/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T22:21:30Z","updated_at":"2016-01-19T22:21:30Z","body":"[Related tutorial here](http://compiletoi.net/fast-scraping-in-python-with-asyncio.html) (to develop a unit test)."}}