{"action":"created","comment":{"url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/comments/186846538","pull_request_review_id":118496213,"id":186846538,"diff_hunk":"@@ -53,9 +56,10 @@ public void value(@NonNull File file) throws IOException {\n         beforeValue(false); // add comma if in array\n \n         // Copy the file contents onto the stream\n-        FileReader input = null;\n+        Reader input = null;\n         try {\n-            input = new FileReader(file);\n+            FileInputStream fis = new FileInputStream(file);\n+            input = new BufferedReader(new InputStreamReader(fis, \"UTF-8\"));","path":"sdk/src/main/java/com/bugsnag/android/JsonStream.java","position":23,"original_position":23,"commit_id":"e00ff454be534f9fc4f63e0c8f881ed848dab70b","original_commit_id":"e00ff454be534f9fc4f63e0c8f881ed848dab70b","user":{"login":"martin308","id":475364,"avatar_url":"https://avatars0.githubusercontent.com/u/475364?v=4","gravatar_id":"","url":"https://api.github.com/users/martin308","html_url":"https://github.com/martin308","followers_url":"https://api.github.com/users/martin308/followers","following_url":"https://api.github.com/users/martin308/following{/other_user}","gists_url":"https://api.github.com/users/martin308/gists{/gist_id}","starred_url":"https://api.github.com/users/martin308/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin308/subscriptions","organizations_url":"https://api.github.com/users/martin308/orgs","repos_url":"https://api.github.com/users/martin308/repos","events_url":"https://api.github.com/users/martin308/events{/privacy}","received_events_url":"https://api.github.com/users/martin308/received_events","type":"User","site_admin":false},"body":"do any of these objects also need closing?","created_at":"2018-05-08T19:50:06Z","updated_at":"2018-05-08T19:51:37Z","html_url":"https://github.com/bugsnag/bugsnag-android/pull/307#discussion_r186846538","pull_request_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/comments/186846538"},"html":{"href":"https://github.com/bugsnag/bugsnag-android/pull/307#discussion_r186846538"},"pull_request":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307","id":185155311,"html_url":"https://github.com/bugsnag/bugsnag-android/pull/307","diff_url":"https://github.com/bugsnag/bugsnag-android/pull/307.diff","patch_url":"https://github.com/bugsnag/bugsnag-android/pull/307.patch","issue_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/307","number":307,"state":"open","locked":false,"title":"Perf: use buffered streams for IO","user":{"login":"fractalwrench","id":11800640,"avatar_url":"https://avatars3.githubusercontent.com/u/11800640?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalwrench","html_url":"https://github.com/fractalwrench","followers_url":"https://api.github.com/users/fractalwrench/followers","following_url":"https://api.github.com/users/fractalwrench/following{/other_user}","gists_url":"https://api.github.com/users/fractalwrench/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalwrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalwrench/subscriptions","organizations_url":"https://api.github.com/users/fractalwrench/orgs","repos_url":"https://api.github.com/users/fractalwrench/repos","events_url":"https://api.github.com/users/fractalwrench/events{/privacy}","received_events_url":"https://api.github.com/users/fractalwrench/received_events","type":"User","site_admin":false},"body":"`FileReader` and `FileWriter` are not buffered, meaning they are slow. This change wraps all IO streams in a buffered reader/writer which in an (unscientific) unit test of the ErrorStore, reduced the write of an error from ~230ms to ~115ms.\r\n\r\nThis also allows us to specify the charset encoding explicitly, which is a potential (but unproven) cause for File serialisation issues on devices from certain manufacturers.","created_at":"2018-05-01T10:29:38Z","updated_at":"2018-05-08T19:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86f31a312ae29b72933c6a5302c8d91b51926f27","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307/commits","review_comments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307/comments","review_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/307/comments","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-android/statuses/e00ff454be534f9fc4f63e0c8f881ed848dab70b","head":{"label":"bugsnag:use-buffered-streams","ref":"use-buffered-streams","sha":"e00ff454be534f9fc4f63e0c8f881ed848dab70b","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":2406783,"name":"bugsnag-android","full_name":"bugsnag/bugsnag-android","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-android","description":"Bugsnag crash reporting for Android apps","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-android","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-android/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-android/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-android/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-android/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-android/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-android/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-android/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-android/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-android/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-android/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-android/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-android/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-android/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-android/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-android/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-android/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-android/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-android/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-android/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/deployments","created_at":"2011-09-17T21:18:06Z","updated_at":"2018-05-08T18:35:31Z","pushed_at":"2018-05-08T16:09:03Z","git_url":"git://github.com/bugsnag/bugsnag-android.git","ssh_url":"git@github.com:bugsnag/bugsnag-android.git","clone_url":"https://github.com/bugsnag/bugsnag-android.git","svn_url":"https://github.com/bugsnag/bugsnag-android","homepage":"https://www.bugsnag.com/platforms/android/","size":1915,"stargazers_count":716,"watchers_count":716,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":137,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":137,"open_issues":18,"watchers":716,"default_branch":"master"}},"base":{"label":"bugsnag:next","ref":"next","sha":"f76d408306a19671e469ffdd476b935add78f22a","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":2406783,"name":"bugsnag-android","full_name":"bugsnag/bugsnag-android","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-android","description":"Bugsnag crash reporting for Android apps","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-android","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-android/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-android/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-android/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-android/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-android/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-android/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-android/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-android/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-android/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-android/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-android/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-android/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-android/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-android/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-android/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-android/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-android/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-android/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-android/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-android/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-android/deployments","created_at":"2011-09-17T21:18:06Z","updated_at":"2018-05-08T18:35:31Z","pushed_at":"2018-05-08T16:09:03Z","git_url":"git://github.com/bugsnag/bugsnag-android.git","ssh_url":"git@github.com:bugsnag/bugsnag-android.git","clone_url":"https://github.com/bugsnag/bugsnag-android.git","svn_url":"https://github.com/bugsnag/bugsnag-android","homepage":"https://www.bugsnag.com/platforms/android/","size":1915,"stargazers_count":716,"watchers_count":716,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":137,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":137,"open_issues":18,"watchers":716,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307"},"html":{"href":"https://github.com/bugsnag/bugsnag-android/pull/307"},"issue":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/307"},"comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/bugsnag/bugsnag-android/statuses/e00ff454be534f9fc4f63e0c8f881ed848dab70b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"martin308"}}