{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/comments/34491222","id":34491222,"diff_hunk":"@@ -95,8 +95,10 @@ func (ap *AnsiParser) csiDispatch() error {\n }\n \n func (ap *AnsiParser) print() error {\n-\tlogger.Infof(\"AnsiParser::print %#x\", ap.context.currentChar)","path":"parser_actions.go","position":4,"original_position":4,"commit_id":"538d950a31fb164053976e000cd42357e196ee06","original_commit_id":"538d950a31fb164053976e000cd42357e196ee06","user":{"login":"brendandixon","id":305205,"avatar_url":"https://avatars.githubusercontent.com/u/305205?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandixon","html_url":"https://github.com/brendandixon","followers_url":"https://api.github.com/users/brendandixon/followers","following_url":"https://api.github.com/users/brendandixon/following{/other_user}","gists_url":"https://api.github.com/users/brendandixon/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandixon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandixon/subscriptions","organizations_url":"https://api.github.com/users/brendandixon/orgs","repos_url":"https://api.github.com/users/brendandixon/repos","events_url":"https://api.github.com/users/brendandixon/events{/privacy}","received_events_url":"https://api.github.com/users/brendandixon/received_events","type":"User","site_admin":false},"body":"Can we add back the logger statement? Thank you.","created_at":"2015-07-13T17:56:55Z","updated_at":"2015-07-13T17:56:55Z","html_url":"https://github.com/Azure/go-ansiterm/pull/4#discussion_r34491222","pull_request_url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/comments/34491222"},"html":{"href":"https://github.com/Azure/go-ansiterm/pull/4#discussion_r34491222"},"pull_request":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4","id":39756076,"html_url":"https://github.com/Azure/go-ansiterm/pull/4","diff_url":"https://github.com/Azure/go-ansiterm/pull/4.diff","patch_url":"https://github.com/Azure/go-ansiterm/pull/4.patch","issue_url":"https://api.github.com/repos/Azure/go-ansiterm/issues/4","number":4,"state":"open","locked":false,"title":"Improve performance of Parse","user":{"login":"jstarks","id":9548354,"avatar_url":"https://avatars.githubusercontent.com/u/9548354?v=3","gravatar_id":"","url":"https://api.github.com/users/jstarks","html_url":"https://github.com/jstarks","followers_url":"https://api.github.com/users/jstarks/followers","following_url":"https://api.github.com/users/jstarks/following{/other_user}","gists_url":"https://api.github.com/users/jstarks/gists{/gist_id}","starred_url":"https://api.github.com/users/jstarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstarks/subscriptions","organizations_url":"https://api.github.com/users/jstarks/orgs","repos_url":"https://api.github.com/users/jstarks/repos","events_url":"https://api.github.com/users/jstarks/events{/privacy}","received_events_url":"https://api.github.com/users/jstarks/received_events","type":"User","site_admin":false},"body":"These commits dramatically improve the performance of Parse() and address issues #2 and #3. This work was the result of using go profiling, and each of the four changes makes a multi-second difference in running dir in windows\\system32 (using Windows Server Containers in docker). With the changes, console speed seems quite reasonable.\r\n\r\nThe commits are mostly independent. The controversial aspects of these changes are:\r\n\r\n1. How I incorporated the buffering for Print (by adding a new Flush function to State). I didn't feel comfortable using the existing Exit because we need to flush when there is no more data and technically we are not exiting the ground state in this case. I also didn't feel great hard-coding the flush behavior into Parse. Feedback is welcome.\r\n\r\n2. I removed the special line feed handing from Execute(). Windows seems to scroll the console just fine without help, and the extra line erase seems incorrect -- I couldn't find any docs that indicate that LF is supposed to erase characters.\r\n\r\n3. I now treat CR and LF as printable characters to improve batching further. They're not technically printable, but the windows console handles them fine without special handing (modulo any bugs I introduced from 2).\r\n\r\n@jhowardmsft FYI","created_at":"2015-07-12T03:05:58Z","updated_at":"2015-07-13T17:56:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2acbad42d5827235e7fcd479e947e1a6a16fe53e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Azure/go-ansiterm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/go-ansiterm/issues/4/comments","statuses_url":"https://api.github.com/repos/Azure/go-ansiterm/statuses/538d950a31fb164053976e000cd42357e196ee06","head":{"label":"jstarks:improve_perf","ref":"improve_perf","sha":"538d950a31fb164053976e000cd42357e196ee06","user":{"login":"jstarks","id":9548354,"avatar_url":"https://avatars.githubusercontent.com/u/9548354?v=3","gravatar_id":"","url":"https://api.github.com/users/jstarks","html_url":"https://github.com/jstarks","followers_url":"https://api.github.com/users/jstarks/followers","following_url":"https://api.github.com/users/jstarks/following{/other_user}","gists_url":"https://api.github.com/users/jstarks/gists{/gist_id}","starred_url":"https://api.github.com/users/jstarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstarks/subscriptions","organizations_url":"https://api.github.com/users/jstarks/orgs","repos_url":"https://api.github.com/users/jstarks/repos","events_url":"https://api.github.com/users/jstarks/events{/privacy}","received_events_url":"https://api.github.com/users/jstarks/received_events","type":"User","site_admin":false},"repo":{"id":38912164,"name":"go-ansiterm","full_name":"jstarks/go-ansiterm","owner":{"login":"jstarks","id":9548354,"avatar_url":"https://avatars.githubusercontent.com/u/9548354?v=3","gravatar_id":"","url":"https://api.github.com/users/jstarks","html_url":"https://github.com/jstarks","followers_url":"https://api.github.com/users/jstarks/followers","following_url":"https://api.github.com/users/jstarks/following{/other_user}","gists_url":"https://api.github.com/users/jstarks/gists{/gist_id}","starred_url":"https://api.github.com/users/jstarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstarks/subscriptions","organizations_url":"https://api.github.com/users/jstarks/orgs","repos_url":"https://api.github.com/users/jstarks/repos","events_url":"https://api.github.com/users/jstarks/events{/privacy}","received_events_url":"https://api.github.com/users/jstarks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jstarks/go-ansiterm","description":"","fork":true,"url":"https://api.github.com/repos/jstarks/go-ansiterm","forks_url":"https://api.github.com/repos/jstarks/go-ansiterm/forks","keys_url":"https://api.github.com/repos/jstarks/go-ansiterm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jstarks/go-ansiterm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jstarks/go-ansiterm/teams","hooks_url":"https://api.github.com/repos/jstarks/go-ansiterm/hooks","issue_events_url":"https://api.github.com/repos/jstarks/go-ansiterm/issues/events{/number}","events_url":"https://api.github.com/repos/jstarks/go-ansiterm/events","assignees_url":"https://api.github.com/repos/jstarks/go-ansiterm/assignees{/user}","branches_url":"https://api.github.com/repos/jstarks/go-ansiterm/branches{/branch}","tags_url":"https://api.github.com/repos/jstarks/go-ansiterm/tags","blobs_url":"https://api.github.com/repos/jstarks/go-ansiterm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jstarks/go-ansiterm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jstarks/go-ansiterm/git/refs{/sha}","trees_url":"https://api.github.com/repos/jstarks/go-ansiterm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jstarks/go-ansiterm/statuses/{sha}","languages_url":"https://api.github.com/repos/jstarks/go-ansiterm/languages","stargazers_url":"https://api.github.com/repos/jstarks/go-ansiterm/stargazers","contributors_url":"https://api.github.com/repos/jstarks/go-ansiterm/contributors","subscribers_url":"https://api.github.com/repos/jstarks/go-ansiterm/subscribers","subscription_url":"https://api.github.com/repos/jstarks/go-ansiterm/subscription","commits_url":"https://api.github.com/repos/jstarks/go-ansiterm/commits{/sha}","git_commits_url":"https://api.github.com/repos/jstarks/go-ansiterm/git/commits{/sha}","comments_url":"https://api.github.com/repos/jstarks/go-ansiterm/comments{/number}","issue_comment_url":"https://api.github.com/repos/jstarks/go-ansiterm/issues/comments{/number}","contents_url":"https://api.github.com/repos/jstarks/go-ansiterm/contents/{+path}","compare_url":"https://api.github.com/repos/jstarks/go-ansiterm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jstarks/go-ansiterm/merges","archive_url":"https://api.github.com/repos/jstarks/go-ansiterm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jstarks/go-ansiterm/downloads","issues_url":"https://api.github.com/repos/jstarks/go-ansiterm/issues{/number}","pulls_url":"https://api.github.com/repos/jstarks/go-ansiterm/pulls{/number}","milestones_url":"https://api.github.com/repos/jstarks/go-ansiterm/milestones{/number}","notifications_url":"https://api.github.com/repos/jstarks/go-ansiterm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jstarks/go-ansiterm/labels{/name}","releases_url":"https://api.github.com/repos/jstarks/go-ansiterm/releases{/id}","created_at":"2015-07-11T03:25:43Z","updated_at":"2015-07-11T03:25:43Z","pushed_at":"2015-07-12T02:51:49Z","git_url":"git://github.com/jstarks/go-ansiterm.git","ssh_url":"git@github.com:jstarks/go-ansiterm.git","clone_url":"https://github.com/jstarks/go-ansiterm.git","svn_url":"https://github.com/jstarks/go-ansiterm","homepage":null,"size":106,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"Azure:master","ref":"master","sha":"2bee740cfe94f9323daefcd2cdffc0e33f01820e","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":37092874,"name":"go-ansiterm","full_name":"Azure/go-ansiterm","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/go-ansiterm","description":"","fork":false,"url":"https://api.github.com/repos/Azure/go-ansiterm","forks_url":"https://api.github.com/repos/Azure/go-ansiterm/forks","keys_url":"https://api.github.com/repos/Azure/go-ansiterm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/go-ansiterm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/go-ansiterm/teams","hooks_url":"https://api.github.com/repos/Azure/go-ansiterm/hooks","issue_events_url":"https://api.github.com/repos/Azure/go-ansiterm/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/go-ansiterm/events","assignees_url":"https://api.github.com/repos/Azure/go-ansiterm/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/go-ansiterm/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/go-ansiterm/tags","blobs_url":"https://api.github.com/repos/Azure/go-ansiterm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/go-ansiterm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/go-ansiterm/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/go-ansiterm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/go-ansiterm/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/go-ansiterm/languages","stargazers_url":"https://api.github.com/repos/Azure/go-ansiterm/stargazers","contributors_url":"https://api.github.com/repos/Azure/go-ansiterm/contributors","subscribers_url":"https://api.github.com/repos/Azure/go-ansiterm/subscribers","subscription_url":"https://api.github.com/repos/Azure/go-ansiterm/subscription","commits_url":"https://api.github.com/repos/Azure/go-ansiterm/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/go-ansiterm/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/go-ansiterm/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/go-ansiterm/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/go-ansiterm/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/go-ansiterm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/go-ansiterm/merges","archive_url":"https://api.github.com/repos/Azure/go-ansiterm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/go-ansiterm/downloads","issues_url":"https://api.github.com/repos/Azure/go-ansiterm/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/go-ansiterm/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/go-ansiterm/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/go-ansiterm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/go-ansiterm/labels{/name}","releases_url":"https://api.github.com/repos/Azure/go-ansiterm/releases{/id}","created_at":"2015-06-08T21:08:30Z","updated_at":"2015-06-09T00:09:16Z","pushed_at":"2015-07-12T03:05:58Z","git_url":"git://github.com/Azure/go-ansiterm.git","ssh_url":"git@github.com:Azure/go-ansiterm.git","clone_url":"https://github.com/Azure/go-ansiterm.git","svn_url":"https://github.com/Azure/go-ansiterm","homepage":null,"size":152,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4"},"html":{"href":"https://github.com/Azure/go-ansiterm/pull/4"},"issue":{"href":"https://api.github.com/repos/Azure/go-ansiterm/issues/4"},"comments":{"href":"https://api.github.com/repos/Azure/go-ansiterm/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/go-ansiterm/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/go-ansiterm/statuses/538d950a31fb164053976e000cd42357e196ee06"}}}}