{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7112","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7112/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7112/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7112/events","html_url":"https://github.com/bitcoin/bitcoin/pull/7112","id":119162560,"number":7112,"title":"[Qt] reduce cs_main locks during tip update, more fluently update UI","user":{"login":"jonasschnelli","id":178464,"avatar_url":"https://avatars.githubusercontent.com/u/178464?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasschnelli","html_url":"https://github.com/jonasschnelli","followers_url":"https://api.github.com/users/jonasschnelli/followers","following_url":"https://api.github.com/users/jonasschnelli/following{/other_user}","gists_url":"https://api.github.com/users/jonasschnelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasschnelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasschnelli/subscriptions","organizations_url":"https://api.github.com/users/jonasschnelli/orgs","repos_url":"https://api.github.com/users/jonasschnelli/repos","events_url":"https://api.github.com/users/jonasschnelli/events{/privacy}","received_events_url":"https://api.github.com/users/jonasschnelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/GUI","name":"GUI","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-27T09:34:31Z","updated_at":"2015-11-27T11:49:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7112","html_url":"https://github.com/bitcoin/bitcoin/pull/7112","diff_url":"https://github.com/bitcoin/bitcoin/pull/7112.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/7112.patch"},"body":"At the moment, the UI gets often not updated during initial sync or a catch-up of serval blocks. The UI's try_lock often can't acquire the lock which result in a bad user experience (\"Baby, it's not updating!\").\r\n\r\nThis PR changes the blocktip-update signal parameter form a bare hash (`uint256`) to a `CBlockIndex*`, which allows to safely get it's height and timestamp without locking anything. In addition, the blocktip-update signal now gets fired also during initial sync, but with an extra boolean flag that indicates the initial sync state.\r\nThe PR temporarily has a benchmark for the tip update signal. On my standard system it uses 0.03ms for the signal (=reasonable). Keep in mind that this signal is synchronous, but it will emit another asynchronous QT signal to the UI thread that will care about the UI update!\r\n\r\nThe timer based update (every 250ms) is still active for bandwidth and mempool UI observation, although there no cs_main lock is required."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/160122510","html_url":"https://github.com/bitcoin/bitcoin/pull/7112#issuecomment-160122510","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7112","id":160122510,"user":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars.githubusercontent.com/u/6399679?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T11:49:48Z","updated_at":"2015-11-27T11:49:48Z","body":"Concept ACK. f60a931d9137854f3bbcbc0589ab31563662c3c3 Looks a lot smoother on my system."}}