{"action":"closed","number":365,"pull_request":{"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365","id":53532102,"html_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/365","diff_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/365.diff","patch_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/365.patch","issue_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/365","number":365,"state":"closed","locked":false,"title":"Improve performance when streaming to Inital State and prevent buffer growing unbounded","user":{"login":"rappleg","id":222758,"avatar_url":"https://avatars.githubusercontent.com/u/222758?v=3","gravatar_id":"","url":"https://api.github.com/users/rappleg","html_url":"https://github.com/rappleg","followers_url":"https://api.github.com/users/rappleg/followers","following_url":"https://api.github.com/users/rappleg/following{/other_user}","gists_url":"https://api.github.com/users/rappleg/gists{/gist_id}","starred_url":"https://api.github.com/users/rappleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rappleg/subscriptions","organizations_url":"https://api.github.com/users/rappleg/orgs","repos_url":"https://api.github.com/users/rappleg/repos","events_url":"https://api.github.com/users/rappleg/events{/privacy}","received_events_url":"https://api.github.com/users/rappleg/received_events","type":"User","site_admin":false},"body":"Reduce DB hits to access atomicState by several times per execution of the genericHandler.  This greatly reduces SmartApp execution latency and allows the events to be streamed to Initial State faster.\r\n\r\nMore importantly this fixes several edge cases where the eventBuffer can grow unbounded and once it becomes too large will always fail when trying to post to Initial State.\r\n\r\n/cc @bflorian","created_at":"2015-12-14T07:28:23Z","updated_at":"2015-12-15T01:24:46Z","closed_at":"2015-12-15T01:24:46Z","merged_at":"2015-12-15T01:24:46Z","merge_commit_sha":"2ea6e430d7d51ecc43f798ecf63eb887aeb3f0d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365/commits","review_comments_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365/comments","review_comment_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/365/comments","statuses_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/statuses/18bfa87948cf86afbd69480fbc99cb0d139d61a0","head":{"label":"rappleg:PreventEventBufferInitialStateGrowingUnbounded","ref":"PreventEventBufferInitialStateGrowingUnbounded","sha":"18bfa87948cf86afbd69480fbc99cb0d139d61a0","user":{"login":"rappleg","id":222758,"avatar_url":"https://avatars.githubusercontent.com/u/222758?v=3","gravatar_id":"","url":"https://api.github.com/users/rappleg","html_url":"https://github.com/rappleg","followers_url":"https://api.github.com/users/rappleg/followers","following_url":"https://api.github.com/users/rappleg/following{/other_user}","gists_url":"https://api.github.com/users/rappleg/gists{/gist_id}","starred_url":"https://api.github.com/users/rappleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rappleg/subscriptions","organizations_url":"https://api.github.com/users/rappleg/orgs","repos_url":"https://api.github.com/users/rappleg/repos","events_url":"https://api.github.com/users/rappleg/events{/privacy}","received_events_url":"https://api.github.com/users/rappleg/received_events","type":"User","site_admin":false},"repo":{"id":41766074,"name":"SmartThingsPublic","full_name":"rappleg/SmartThingsPublic","owner":{"login":"rappleg","id":222758,"avatar_url":"https://avatars.githubusercontent.com/u/222758?v=3","gravatar_id":"","url":"https://api.github.com/users/rappleg","html_url":"https://github.com/rappleg","followers_url":"https://api.github.com/users/rappleg/followers","following_url":"https://api.github.com/users/rappleg/following{/other_user}","gists_url":"https://api.github.com/users/rappleg/gists{/gist_id}","starred_url":"https://api.github.com/users/rappleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rappleg/subscriptions","organizations_url":"https://api.github.com/users/rappleg/orgs","repos_url":"https://api.github.com/users/rappleg/repos","events_url":"https://api.github.com/users/rappleg/events{/privacy}","received_events_url":"https://api.github.com/users/rappleg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rappleg/SmartThingsPublic","description":"","fork":true,"url":"https://api.github.com/repos/rappleg/SmartThingsPublic","forks_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/forks","keys_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/teams","hooks_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/hooks","issue_events_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/issues/events{/number}","events_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/events","assignees_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/assignees{/user}","branches_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/branches{/branch}","tags_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/tags","blobs_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/git/refs{/sha}","trees_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/statuses/{sha}","languages_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/languages","stargazers_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/stargazers","contributors_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/contributors","subscribers_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/subscribers","subscription_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/subscription","commits_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/commits{/sha}","git_commits_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/git/commits{/sha}","comments_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/comments{/number}","issue_comment_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/issues/comments{/number}","contents_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/contents/{+path}","compare_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/merges","archive_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/downloads","issues_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/issues{/number}","pulls_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/pulls{/number}","milestones_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/milestones{/number}","notifications_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/labels{/name}","releases_url":"https://api.github.com/repos/rappleg/SmartThingsPublic/releases{/id}","created_at":"2015-09-01T22:12:55Z","updated_at":"2015-09-01T22:12:57Z","pushed_at":"2015-12-15T00:41:07Z","git_url":"git://github.com/rappleg/SmartThingsPublic.git","ssh_url":"git@github.com:rappleg/SmartThingsPublic.git","clone_url":"https://github.com/rappleg/SmartThingsPublic.git","svn_url":"https://github.com/rappleg/SmartThingsPublic","homepage":null,"size":1305,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SmartThingsCommunity:master","ref":"master","sha":"7fc4aaa3419f99a884ffebf08d6e2eeb2ffeae0c","user":{"login":"SmartThingsCommunity","id":7317431,"avatar_url":"https://avatars.githubusercontent.com/u/7317431?v=3","gravatar_id":"","url":"https://api.github.com/users/SmartThingsCommunity","html_url":"https://github.com/SmartThingsCommunity","followers_url":"https://api.github.com/users/SmartThingsCommunity/followers","following_url":"https://api.github.com/users/SmartThingsCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SmartThingsCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SmartThingsCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmartThingsCommunity/subscriptions","organizations_url":"https://api.github.com/users/SmartThingsCommunity/orgs","repos_url":"https://api.github.com/users/SmartThingsCommunity/repos","events_url":"https://api.github.com/users/SmartThingsCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SmartThingsCommunity/received_events","type":"Organization","site_admin":false},"repo":{"id":40212802,"name":"SmartThingsPublic","full_name":"SmartThingsCommunity/SmartThingsPublic","owner":{"login":"SmartThingsCommunity","id":7317431,"avatar_url":"https://avatars.githubusercontent.com/u/7317431?v=3","gravatar_id":"","url":"https://api.github.com/users/SmartThingsCommunity","html_url":"https://github.com/SmartThingsCommunity","followers_url":"https://api.github.com/users/SmartThingsCommunity/followers","following_url":"https://api.github.com/users/SmartThingsCommunity/following{/other_user}","gists_url":"https://api.github.com/users/SmartThingsCommunity/gists{/gist_id}","starred_url":"https://api.github.com/users/SmartThingsCommunity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmartThingsCommunity/subscriptions","organizations_url":"https://api.github.com/users/SmartThingsCommunity/orgs","repos_url":"https://api.github.com/users/SmartThingsCommunity/repos","events_url":"https://api.github.com/users/SmartThingsCommunity/events{/privacy}","received_events_url":"https://api.github.com/users/SmartThingsCommunity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic","description":"","fork":false,"url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic","forks_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/forks","keys_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/teams","hooks_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/hooks","issue_events_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/events{/number}","events_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/events","assignees_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/assignees{/user}","branches_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/branches{/branch}","tags_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/tags","blobs_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/git/refs{/sha}","trees_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/statuses/{sha}","languages_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/languages","stargazers_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/stargazers","contributors_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/contributors","subscribers_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/subscribers","subscription_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/subscription","commits_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/commits{/sha}","git_commits_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/git/commits{/sha}","comments_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/comments{/number}","issue_comment_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/comments{/number}","contents_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/contents/{+path}","compare_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/merges","archive_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/downloads","issues_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues{/number}","pulls_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls{/number}","milestones_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/milestones{/number}","notifications_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/labels{/name}","releases_url":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/releases{/id}","created_at":"2015-08-04T22:48:02Z","updated_at":"2015-12-14T23:23:30Z","pushed_at":"2015-12-15T01:24:46Z","git_url":"git://github.com/SmartThingsCommunity/SmartThingsPublic.git","ssh_url":"git@github.com:SmartThingsCommunity/SmartThingsPublic.git","clone_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic.git","svn_url":"https://github.com/SmartThingsCommunity/SmartThingsPublic","homepage":null,"size":2959,"stargazers_count":112,"watchers_count":112,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1928,"mirror_url":null,"open_issues_count":118,"forks":1928,"open_issues":118,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365"},"html":{"href":"https://github.com/SmartThingsCommunity/SmartThingsPublic/pull/365"},"issue":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/365"},"comments":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/issues/365/comments"},"review_comments":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365/comments"},"review_comment":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/pulls/365/commits"},"statuses":{"href":"https://api.github.com/repos/SmartThingsCommunity/SmartThingsPublic/statuses/18bfa87948cf86afbd69480fbc99cb0d139d61a0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"kris-schaller","id":5333357,"avatar_url":"https://avatars.githubusercontent.com/u/5333357?v=3","gravatar_id":"","url":"https://api.github.com/users/kris-schaller","html_url":"https://github.com/kris-schaller","followers_url":"https://api.github.com/users/kris-schaller/followers","following_url":"https://api.github.com/users/kris-schaller/following{/other_user}","gists_url":"https://api.github.com/users/kris-schaller/gists{/gist_id}","starred_url":"https://api.github.com/users/kris-schaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kris-schaller/subscriptions","organizations_url":"https://api.github.com/users/kris-schaller/orgs","repos_url":"https://api.github.com/users/kris-schaller/repos","events_url":"https://api.github.com/users/kris-schaller/events{/privacy}","received_events_url":"https://api.github.com/users/kris-schaller/received_events","type":"User","site_admin":false},"comments":3,"review_comments":13,"commits":1,"additions":27,"deletions":33,"changed_files":1}}