{"action":"created","comment":{"url":"https://api.github.com/repos/urbit/urbit/pulls/comments/240822832","pull_request_review_id":183943213,"id":240822832,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDgyMjgzMg==","diff_hunk":"@@ -1464,19 +1466,21 @@ _raft_sure(u3_noun ovo, u3_noun vir, u3_noun cor)\n       u3z(ovo);\n \n       // push a new event into queue\n-      u3A->roe = u3nc(u3nc(vir, u3_nul), u3A->roe);\n+      ret = u3nc(vir, u3_nul);","path":"vere/raft.c","position":27,"original_position":27,"commit_id":"d8b70683451ddfe25926ea6d368742118c2740b8","original_commit_id":"d8b70683451ddfe25926ea6d368742118c2740b8","user":{"login":"joemfb","id":702304,"node_id":"MDQ6VXNlcjcwMjMwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/702304?v=4","gravatar_id":"","url":"https://api.github.com/users/joemfb","html_url":"https://github.com/joemfb","followers_url":"https://api.github.com/users/joemfb/followers","following_url":"https://api.github.com/users/joemfb/following{/other_user}","gists_url":"https://api.github.com/users/joemfb/gists{/gist_id}","starred_url":"https://api.github.com/users/joemfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joemfb/subscriptions","organizations_url":"https://api.github.com/users/joemfb/orgs","repos_url":"https://api.github.com/users/joemfb/repos","events_url":"https://api.github.com/users/joemfb/events{/privacy}","received_events_url":"https://api.github.com/users/joemfb/received_events","type":"User","site_admin":false},"body":"It looks like we're replacing the event ovum with `u3_nul` if the state didn't change in computing the event. I don't think that's being checked for anywhere else though. We can skip persistence in that case, can we not?","created_at":"2018-12-11T22:53:39Z","updated_at":"2018-12-11T22:53:40Z","html_url":"https://github.com/urbit/urbit/pull/910#discussion_r240822832","pull_request_url":"https://api.github.com/repos/urbit/urbit/pulls/910","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/urbit/urbit/pulls/comments/240822832"},"html":{"href":"https://github.com/urbit/urbit/pull/910#discussion_r240822832"},"pull_request":{"href":"https://api.github.com/repos/urbit/urbit/pulls/910"}}},"pull_request":{"url":"https://api.github.com/repos/urbit/urbit/pulls/910","id":159198132,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU5MTk4MTMy","html_url":"https://github.com/urbit/urbit/pull/910","diff_url":"https://github.com/urbit/urbit/pull/910.diff","patch_url":"https://github.com/urbit/urbit/pull/910.patch","issue_url":"https://api.github.com/repos/urbit/urbit/issues/910","number":910,"state":"open","locked":false,"title":"Process one event at a time","user":{"login":"belisarius222","id":874741,"node_id":"MDQ6VXNlcjg3NDc0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/874741?v=4","gravatar_id":"","url":"https://api.github.com/users/belisarius222","html_url":"https://github.com/belisarius222","followers_url":"https://api.github.com/users/belisarius222/followers","following_url":"https://api.github.com/users/belisarius222/following{/other_user}","gists_url":"https://api.github.com/users/belisarius222/gists{/gist_id}","starred_url":"https://api.github.com/users/belisarius222/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belisarius222/subscriptions","organizations_url":"https://api.github.com/users/belisarius222/orgs","repos_url":"https://api.github.com/users/belisarius222/repos","events_url":"https://api.github.com/users/belisarius222/events{/privacy}","received_events_url":"https://api.github.com/users/belisarius222/received_events","type":"User","site_admin":false},"body":"Augmented the code that processed all the outstanding Urbit events at once with new logic that processes a single event at a time, then schedules the next Urbit event to be processed in a later libuv event.\r\n\r\nDuring normal runtime the events are processed asynchronously one at a time. On boot and shutdown, all events are processed synchronously.\r\n\r\nI had originally written this using libuv's \"idler\" pattern, but that caused pathological changes to the control flow in libuv's event loop and 100% CPU usage, so I abandoned that approach. Instead, I repurposed the timer in the u3Z raft struct to trigger the processing of the next event.\r\n\r\nInitial unscientific testing suggests this might feel slightly more responsive in the dojo; certainly pasted text starts appearing much faster. We should test the web publishing performance before merging. Also note that there used to be a garbage collection pass after each event was processed. That's no longer called, since I wasn't entirely sure where it should be called with this new code.","created_at":"2017-12-19T15:36:54Z","updated_at":"2018-12-11T22:53:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40913977e692e3accd5887fcace71784396ae0f9","assignee":{"login":"cgyarvin","id":193025,"node_id":"MDQ6VXNlcjE5MzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/193025?v=4","gravatar_id":"","url":"https://api.github.com/users/cgyarvin","html_url":"https://github.com/cgyarvin","followers_url":"https://api.github.com/users/cgyarvin/followers","following_url":"https://api.github.com/users/cgyarvin/following{/other_user}","gists_url":"https://api.github.com/users/cgyarvin/gists{/gist_id}","starred_url":"https://api.github.com/users/cgyarvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgyarvin/subscriptions","organizations_url":"https://api.github.com/users/cgyarvin/orgs","repos_url":"https://api.github.com/users/cgyarvin/repos","events_url":"https://api.github.com/users/cgyarvin/events{/privacy}","received_events_url":"https://api.github.com/users/cgyarvin/received_events","type":"User","site_admin":false},"assignees":[{"login":"cgyarvin","id":193025,"node_id":"MDQ6VXNlcjE5MzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/193025?v=4","gravatar_id":"","url":"https://api.github.com/users/cgyarvin","html_url":"https://github.com/cgyarvin","followers_url":"https://api.github.com/users/cgyarvin/followers","following_url":"https://api.github.com/users/cgyarvin/following{/other_user}","gists_url":"https://api.github.com/users/cgyarvin/gists{/gist_id}","starred_url":"https://api.github.com/users/cgyarvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgyarvin/subscriptions","organizations_url":"https://api.github.com/users/cgyarvin/orgs","repos_url":"https://api.github.com/users/cgyarvin/repos","events_url":"https://api.github.com/users/cgyarvin/events{/privacy}","received_events_url":"https://api.github.com/users/cgyarvin/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":846451789,"node_id":"MDU6TGFiZWw4NDY0NTE3ODk=","url":"https://api.github.com/repos/urbit/urbit/labels/enhancement","name":"enhancement","color":"c5def5","default":true},{"id":186833088,"node_id":"MDU6TGFiZWwxODY4MzMwODg=","url":"https://api.github.com/repos/urbit/urbit/labels/libuv","name":"libuv","color":"f9d0c4","default":false},{"id":251477510,"node_id":"MDU6TGFiZWwyNTE0Nzc1MTA=","url":"https://api.github.com/repos/urbit/urbit/labels/performance","name":"performance","color":"c5def5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/urbit/urbit/pulls/910/commits","review_comments_url":"https://api.github.com/repos/urbit/urbit/pulls/910/comments","review_comment_url":"https://api.github.com/repos/urbit/urbit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urbit/urbit/issues/910/comments","statuses_url":"https://api.github.com/repos/urbit/urbit/statuses/d8b70683451ddfe25926ea6d368742118c2740b8","head":{"label":"urbit:lather","ref":"lather","sha":"d8b70683451ddfe25926ea6d368742118c2740b8","user":{"login":"urbit","id":5237680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMzc2ODA=","avatar_url":"https://avatars3.githubusercontent.com/u/5237680?v=4","gravatar_id":"","url":"https://api.github.com/users/urbit","html_url":"https://github.com/urbit","followers_url":"https://api.github.com/users/urbit/followers","following_url":"https://api.github.com/users/urbit/following{/other_user}","gists_url":"https://api.github.com/users/urbit/gists{/gist_id}","starred_url":"https://api.github.com/users/urbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbit/subscriptions","organizations_url":"https://api.github.com/users/urbit/orgs","repos_url":"https://api.github.com/users/urbit/repos","events_url":"https://api.github.com/users/urbit/events{/privacy}","received_events_url":"https://api.github.com/users/urbit/received_events","type":"Organization","site_admin":false},"repo":{"id":23448856,"node_id":"MDEwOlJlcG9zaXRvcnkyMzQ0ODg1Ng==","name":"urbit","full_name":"urbit/urbit","private":false,"owner":{"login":"urbit","id":5237680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMzc2ODA=","avatar_url":"https://avatars3.githubusercontent.com/u/5237680?v=4","gravatar_id":"","url":"https://api.github.com/users/urbit","html_url":"https://github.com/urbit","followers_url":"https://api.github.com/users/urbit/followers","following_url":"https://api.github.com/users/urbit/following{/other_user}","gists_url":"https://api.github.com/users/urbit/gists{/gist_id}","starred_url":"https://api.github.com/users/urbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbit/subscriptions","organizations_url":"https://api.github.com/users/urbit/orgs","repos_url":"https://api.github.com/users/urbit/repos","events_url":"https://api.github.com/users/urbit/events{/privacy}","received_events_url":"https://api.github.com/users/urbit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/urbit/urbit","description":"An operating function","fork":false,"url":"https://api.github.com/repos/urbit/urbit","forks_url":"https://api.github.com/repos/urbit/urbit/forks","keys_url":"https://api.github.com/repos/urbit/urbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbit/urbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbit/urbit/teams","hooks_url":"https://api.github.com/repos/urbit/urbit/hooks","issue_events_url":"https://api.github.com/repos/urbit/urbit/issues/events{/number}","events_url":"https://api.github.com/repos/urbit/urbit/events","assignees_url":"https://api.github.com/repos/urbit/urbit/assignees{/user}","branches_url":"https://api.github.com/repos/urbit/urbit/branches{/branch}","tags_url":"https://api.github.com/repos/urbit/urbit/tags","blobs_url":"https://api.github.com/repos/urbit/urbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbit/urbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbit/urbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbit/urbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbit/urbit/statuses/{sha}","languages_url":"https://api.github.com/repos/urbit/urbit/languages","stargazers_url":"https://api.github.com/repos/urbit/urbit/stargazers","contributors_url":"https://api.github.com/repos/urbit/urbit/contributors","subscribers_url":"https://api.github.com/repos/urbit/urbit/subscribers","subscription_url":"https://api.github.com/repos/urbit/urbit/subscription","commits_url":"https://api.github.com/repos/urbit/urbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbit/urbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbit/urbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbit/urbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbit/urbit/contents/{+path}","compare_url":"https://api.github.com/repos/urbit/urbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbit/urbit/merges","archive_url":"https://api.github.com/repos/urbit/urbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbit/urbit/downloads","issues_url":"https://api.github.com/repos/urbit/urbit/issues{/number}","pulls_url":"https://api.github.com/repos/urbit/urbit/pulls{/number}","milestones_url":"https://api.github.com/repos/urbit/urbit/milestones{/number}","notifications_url":"https://api.github.com/repos/urbit/urbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbit/urbit/labels{/name}","releases_url":"https://api.github.com/repos/urbit/urbit/releases{/id}","deployments_url":"https://api.github.com/repos/urbit/urbit/deployments","created_at":"2014-08-29T01:38:59Z","updated_at":"2018-12-11T22:18:12Z","pushed_at":"2018-12-11T22:40:03Z","git_url":"git://github.com/urbit/urbit.git","ssh_url":"git@github.com:urbit/urbit.git","clone_url":"https://github.com/urbit/urbit.git","svn_url":"https://github.com/urbit/urbit","homepage":"https://urbit.org","size":13778,"stargazers_count":1590,"watchers_count":1590,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":139,"open_issues":91,"watchers":1590,"default_branch":"master"}},"base":{"label":"urbit:release-candidate","ref":"release-candidate","sha":"99312b86cba3e2a209c11123ed1acb83c01b99a3","user":{"login":"urbit","id":5237680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMzc2ODA=","avatar_url":"https://avatars3.githubusercontent.com/u/5237680?v=4","gravatar_id":"","url":"https://api.github.com/users/urbit","html_url":"https://github.com/urbit","followers_url":"https://api.github.com/users/urbit/followers","following_url":"https://api.github.com/users/urbit/following{/other_user}","gists_url":"https://api.github.com/users/urbit/gists{/gist_id}","starred_url":"https://api.github.com/users/urbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbit/subscriptions","organizations_url":"https://api.github.com/users/urbit/orgs","repos_url":"https://api.github.com/users/urbit/repos","events_url":"https://api.github.com/users/urbit/events{/privacy}","received_events_url":"https://api.github.com/users/urbit/received_events","type":"Organization","site_admin":false},"repo":{"id":23448856,"node_id":"MDEwOlJlcG9zaXRvcnkyMzQ0ODg1Ng==","name":"urbit","full_name":"urbit/urbit","private":false,"owner":{"login":"urbit","id":5237680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMzc2ODA=","avatar_url":"https://avatars3.githubusercontent.com/u/5237680?v=4","gravatar_id":"","url":"https://api.github.com/users/urbit","html_url":"https://github.com/urbit","followers_url":"https://api.github.com/users/urbit/followers","following_url":"https://api.github.com/users/urbit/following{/other_user}","gists_url":"https://api.github.com/users/urbit/gists{/gist_id}","starred_url":"https://api.github.com/users/urbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbit/subscriptions","organizations_url":"https://api.github.com/users/urbit/orgs","repos_url":"https://api.github.com/users/urbit/repos","events_url":"https://api.github.com/users/urbit/events{/privacy}","received_events_url":"https://api.github.com/users/urbit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/urbit/urbit","description":"An operating function","fork":false,"url":"https://api.github.com/repos/urbit/urbit","forks_url":"https://api.github.com/repos/urbit/urbit/forks","keys_url":"https://api.github.com/repos/urbit/urbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbit/urbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbit/urbit/teams","hooks_url":"https://api.github.com/repos/urbit/urbit/hooks","issue_events_url":"https://api.github.com/repos/urbit/urbit/issues/events{/number}","events_url":"https://api.github.com/repos/urbit/urbit/events","assignees_url":"https://api.github.com/repos/urbit/urbit/assignees{/user}","branches_url":"https://api.github.com/repos/urbit/urbit/branches{/branch}","tags_url":"https://api.github.com/repos/urbit/urbit/tags","blobs_url":"https://api.github.com/repos/urbit/urbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbit/urbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbit/urbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbit/urbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbit/urbit/statuses/{sha}","languages_url":"https://api.github.com/repos/urbit/urbit/languages","stargazers_url":"https://api.github.com/repos/urbit/urbit/stargazers","contributors_url":"https://api.github.com/repos/urbit/urbit/contributors","subscribers_url":"https://api.github.com/repos/urbit/urbit/subscribers","subscription_url":"https://api.github.com/repos/urbit/urbit/subscription","commits_url":"https://api.github.com/repos/urbit/urbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbit/urbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbit/urbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbit/urbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbit/urbit/contents/{+path}","compare_url":"https://api.github.com/repos/urbit/urbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbit/urbit/merges","archive_url":"https://api.github.com/repos/urbit/urbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbit/urbit/downloads","issues_url":"https://api.github.com/repos/urbit/urbit/issues{/number}","pulls_url":"https://api.github.com/repos/urbit/urbit/pulls{/number}","milestones_url":"https://api.github.com/repos/urbit/urbit/milestones{/number}","notifications_url":"https://api.github.com/repos/urbit/urbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbit/urbit/labels{/name}","releases_url":"https://api.github.com/repos/urbit/urbit/releases{/id}","deployments_url":"https://api.github.com/repos/urbit/urbit/deployments","created_at":"2014-08-29T01:38:59Z","updated_at":"2018-12-11T22:18:12Z","pushed_at":"2018-12-11T22:40:03Z","git_url":"git://github.com/urbit/urbit.git","ssh_url":"git@github.com:urbit/urbit.git","clone_url":"https://github.com/urbit/urbit.git","svn_url":"https://github.com/urbit/urbit","homepage":"https://urbit.org","size":13778,"stargazers_count":1590,"watchers_count":1590,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":139,"open_issues":91,"watchers":1590,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urbit/urbit/pulls/910"},"html":{"href":"https://github.com/urbit/urbit/pull/910"},"issue":{"href":"https://api.github.com/repos/urbit/urbit/issues/910"},"comments":{"href":"https://api.github.com/repos/urbit/urbit/issues/910/comments"},"review_comments":{"href":"https://api.github.com/repos/urbit/urbit/pulls/910/comments"},"review_comment":{"href":"https://api.github.com/repos/urbit/urbit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urbit/urbit/pulls/910/commits"},"statuses":{"href":"https://api.github.com/repos/urbit/urbit/statuses/d8b70683451ddfe25926ea6d368742118c2740b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"joemfb"}}