{"action":"closed","issue":{"url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/issues/1","labels_url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/issues/1/comments","events_url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/issues/1/events","html_url":"https://github.com/AndiDittrich/Node.CLI-Progress/issues/1","id":126749132,"number":1,"title":"Render never runs within synchronous loop","user":{"login":"JimmyBoh","id":2332163,"avatar_url":"https://avatars.githubusercontent.com/u/2332163?v=3","gravatar_id":"","url":"https://api.github.com/users/JimmyBoh","html_url":"https://github.com/JimmyBoh","followers_url":"https://api.github.com/users/JimmyBoh/followers","following_url":"https://api.github.com/users/JimmyBoh/following{/other_user}","gists_url":"https://api.github.com/users/JimmyBoh/gists{/gist_id}","starred_url":"https://api.github.com/users/JimmyBoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JimmyBoh/subscriptions","organizations_url":"https://api.github.com/users/JimmyBoh/orgs","repos_url":"https://api.github.com/users/JimmyBoh/repos","events_url":"https://api.github.com/users/JimmyBoh/events{/privacy}","received_events_url":"https://api.github.com/users/JimmyBoh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"AndiDittrich","id":1474107,"avatar_url":"https://avatars.githubusercontent.com/u/1474107?v=3","gravatar_id":"","url":"https://api.github.com/users/AndiDittrich","html_url":"https://github.com/AndiDittrich","followers_url":"https://api.github.com/users/AndiDittrich/followers","following_url":"https://api.github.com/users/AndiDittrich/following{/other_user}","gists_url":"https://api.github.com/users/AndiDittrich/gists{/gist_id}","starred_url":"https://api.github.com/users/AndiDittrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndiDittrich/subscriptions","organizations_url":"https://api.github.com/users/AndiDittrich/orgs","repos_url":"https://api.github.com/users/AndiDittrich/repos","events_url":"https://api.github.com/users/AndiDittrich/events{/privacy}","received_events_url":"https://api.github.com/users/AndiDittrich/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/milestones/1","html_url":"https://github.com/AndiDittrich/Node.CLI-Progress/milestones/v1.1","labels_url":"https://api.github.com/repos/AndiDittrich/Node.CLI-Progress/milestones/1/labels","id":1507870,"number":1,"title":"v1.1","description":null,"creator":{"login":"AndiDittrich","id":1474107,"avatar_url":"https://avatars.githubusercontent.com/u/1474107?v=3","gravatar_id":"","url":"https://api.github.com/users/AndiDittrich","html_url":"https://github.com/AndiDittrich","followers_url":"https://api.github.com/users/AndiDittrich/followers","following_url":"https://api.github.com/users/AndiDittrich/following{/other_user}","gists_url":"https://api.github.com/users/AndiDittrich/gists{/gist_id}","starred_url":"https://api.github.com/users/AndiDittrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndiDittrich/subscriptions","organizations_url":"https://api.github.com/users/AndiDittrich/orgs","repos_url":"https://api.github.com/users/AndiDittrich/repos","events_url":"https://api.github.com/users/AndiDittrich/events{/privacy}","received_events_url":"https://api.github.com/users/AndiDittrich/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2016-01-14T21:56:40Z","updated_at":"2016-01-23T13:34:14Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-01-14T21:12:18Z","updated_at":"2016-01-23T13:34:14Z","closed_at":"2016-01-23T13:34:14Z","body":"Since the internal `render` function is only called on the tick of a `setInterval` it will never get rendered if looping through a set of synchronous actions.\r\n\r\nA better approach would be to to keep track of when the bar was rendered last, and only attempt to re-render when `update` is called. That would give the same optimization as re-rendering when there is a change but also works with synchronous code."}}