{"action":"closed","number":58,"pull_request":{"url":"https://api.github.com/repos/grafov/m3u8/pulls/58","id":71899292,"html_url":"https://github.com/grafov/m3u8/pull/58","diff_url":"https://github.com/grafov/m3u8/pull/58.diff","patch_url":"https://github.com/grafov/m3u8/pull/58.patch","issue_url":"https://api.github.com/repos/grafov/m3u8/issues/58","number":58,"state":"closed","locked":false,"title":"Hori improvements - Alternative approach","user":{"login":"bradleyfalzon","id":1834577,"avatar_url":"https://avatars.githubusercontent.com/u/1834577?v=3","gravatar_id":"","url":"https://api.github.com/users/bradleyfalzon","html_url":"https://github.com/bradleyfalzon","followers_url":"https://api.github.com/users/bradleyfalzon/followers","following_url":"https://api.github.com/users/bradleyfalzon/following{/other_user}","gists_url":"https://api.github.com/users/bradleyfalzon/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleyfalzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleyfalzon/subscriptions","organizations_url":"https://api.github.com/users/bradleyfalzon/orgs","repos_url":"https://api.github.com/users/bradleyfalzon/repos","events_url":"https://api.github.com/users/bradleyfalzon/events{/privacy}","received_events_url":"https://api.github.com/users/bradleyfalzon/received_events","type":"User","site_admin":false},"body":"Alternative implementation of the improvements by @hori-ryota - all credits for actual changes is theirs. \r\nThis PR cherry picks the biggest impact but lowest risk and maintains ABI compatibility.\r\n\r\nThis is only an example PR, and will need verification, approval and rebasing before merging.\r\n\r\nThis branch:\r\n\r\nBefore:\r\n```\r\nBenchmarkDecodeMasterPlaylist-4   100000             22425 ns/op           12195 B/op         77 allocs/op\r\nBenchmarkDecodeMediaPlaylist-4        50          23947209 ns/op        12279896 B/op     160059 allocs/op\r\nBenchmarkEncodeMasterPlaylist-4  1000000              1023 ns/op              40 B/op         11 allocs/op\r\nBenchmarkEncodeMediaPlaylist-4       100          12931950 ns/op         1748991 B/op      81607 allocs/op\r\n```\r\n\r\nAfter:\r\n```\r\nBenchmarkDecodeMasterPlaylist-4   100000             22534 ns/op           12194 B/op         77 allocs/op\r\nBenchmarkDecodeMediaPlaylist-4       100          16132527 ns/op        10999880 B/op     120059 allocs/op\r\nBenchmarkEncodeMasterPlaylist-4  1000000              1016 ns/op              40 B/op         11 allocs/op\r\nBenchmarkEncodeMediaPlaylist-4       300           4471880 ns/op           45421 B/op        405 allocs/op\r\n```\r\n\r\nBenchstat Summary:\r\n```\r\nname                    old time/op    new time/op    delta\r\nDecodeMasterPlaylist-4    22.4µs ± 0%    22.5µs ± 0%   ~             (p=1.000 n=1+1)\r\nDecodeMediaPlaylist-4     23.9ms ± 0%    16.1ms ± 0%   ~             (p=1.000 n=1+1)\r\nEncodeMasterPlaylist-4    1.02µs ± 0%    1.02µs ± 0%   ~             (p=1.000 n=1+1)\r\nEncodeMediaPlaylist-4     12.9ms ± 0%     4.5ms ± 0%   ~             (p=1.000 n=1+1)\r\n\r\nname                    old alloc/op   new alloc/op   delta\r\nDecodeMasterPlaylist-4    12.2kB ± 0%    12.2kB ± 0%   ~             (p=1.000 n=1+1)\r\nDecodeMediaPlaylist-4     12.3MB ± 0%    11.0MB ± 0%   ~             (p=1.000 n=1+1)\r\nEncodeMasterPlaylist-4     40.0B ± 0%     40.0B ± 0%   ~     (all samples are equal)\r\nEncodeMediaPlaylist-4     1.75MB ± 0%    0.05MB ± 0%   ~             (p=1.000 n=1+1)\r\n\r\nname                    old allocs/op  new allocs/op  delta\r\nDecodeMasterPlaylist-4      77.0 ± 0%      77.0 ± 0%   ~     (all samples are equal)\r\nDecodeMediaPlaylist-4       160k ± 0%      120k ± 0%   ~             (p=1.000 n=1+1)\r\nEncodeMasterPlaylist-4      11.0 ± 0%      11.0 ± 0%   ~     (all samples are equal)\r\nEncodeMediaPlaylist-4      81.6k ± 0%      0.4k ± 0%   ~             (p=1.000 n=1+1)\r\n```\r\n\r\nhttps://github.com/hori-ryota/m3u8 - feature/improve-perform-decodeplaylist\r\n\r\nBefore:\r\n```\r\nBenchmarkDecodeMasterPlaylist-4   100000             23203 ns/op           14955 B/op         77 allocs/op\r\nBenchmarkDecodeMediaPlaylist-4        50          24187010 ns/op        12279952 B/op     160060 allocs/op\r\nBenchmarkEncodeMediaPlaylist-4       100          12919057 ns/op         1748992 B/op      81607 allocs/op\r\n```\r\n\r\nAfter:\r\n```\r\nBenchmarkDecodeMasterPlaylist-4   200000             10104 ns/op           12240 B/op         35 allocs/op\r\nBenchmarkDecodeMediaPlaylist-4       100          16193330 ns/op         9200522 B/op      80019 allocs/op\r\nBenchmarkEncodeMediaPlaylist-4       500           3697907 ns/op           21128 B/op        163 allocs/op\r\n```\r\n\r\nBenchstat Summary:\r\n```\r\nname                    old time/op    new time/op    delta\r\nDecodeMasterPlaylist-4    23.2µs ± 0%    10.1µs ± 0%   ~     (p=1.000 n=1+1)\r\nDecodeMediaPlaylist-4     24.2ms ± 0%    16.2ms ± 0%   ~     (p=1.000 n=1+1)\r\nEncodeMediaPlaylist-4     12.9ms ± 0%     3.7ms ± 0%   ~     (p=1.000 n=1+1)\r\n\r\nname                    old alloc/op   new alloc/op   delta\r\nDecodeMasterPlaylist-4    15.0kB ± 0%    12.2kB ± 0%   ~     (p=1.000 n=1+1)\r\nDecodeMediaPlaylist-4     12.3MB ± 0%     9.2MB ± 0%   ~     (p=1.000 n=1+1)\r\nEncodeMediaPlaylist-4     1.75MB ± 0%    0.02MB ± 0%   ~     (p=1.000 n=1+1)\r\n\r\nname                    old allocs/op  new allocs/op  delta\r\nDecodeMasterPlaylist-4      77.0 ± 0%      35.0 ± 0%   ~     (p=1.000 n=1+1)\r\nDecodeMediaPlaylist-4       160k ± 0%       80k ± 0%   ~     (p=1.000 n=1+1)\r\nEncodeMediaPlaylist-4      81.6k ± 0%      0.2k ± 0%   ~     (p=1.000 n=1+1)\r\n```","created_at":"2016-05-30T13:07:18Z","updated_at":"2016-06-06T01:18:24Z","closed_at":"2016-06-06T01:18:24Z","merged_at":"2016-06-06T01:18:24Z","merge_commit_sha":"d61d5877335baf45265dba49252c7a3f76dc4b0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/grafov/m3u8/pulls/58/commits","review_comments_url":"https://api.github.com/repos/grafov/m3u8/pulls/58/comments","review_comment_url":"https://api.github.com/repos/grafov/m3u8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grafov/m3u8/issues/58/comments","statuses_url":"https://api.github.com/repos/grafov/m3u8/statuses/14d0059fa2229184060b4d29dbd28b17c751ee6e","head":{"label":"bradleyfalzon:hori-improvements","ref":"hori-improvements","sha":"14d0059fa2229184060b4d29dbd28b17c751ee6e","user":{"login":"bradleyfalzon","id":1834577,"avatar_url":"https://avatars.githubusercontent.com/u/1834577?v=3","gravatar_id":"","url":"https://api.github.com/users/bradleyfalzon","html_url":"https://github.com/bradleyfalzon","followers_url":"https://api.github.com/users/bradleyfalzon/followers","following_url":"https://api.github.com/users/bradleyfalzon/following{/other_user}","gists_url":"https://api.github.com/users/bradleyfalzon/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleyfalzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleyfalzon/subscriptions","organizations_url":"https://api.github.com/users/bradleyfalzon/orgs","repos_url":"https://api.github.com/users/bradleyfalzon/repos","events_url":"https://api.github.com/users/bradleyfalzon/events{/privacy}","received_events_url":"https://api.github.com/users/bradleyfalzon/received_events","type":"User","site_admin":false},"repo":{"id":54341205,"name":"m3u8","full_name":"bradleyfalzon/m3u8","owner":{"login":"bradleyfalzon","id":1834577,"avatar_url":"https://avatars.githubusercontent.com/u/1834577?v=3","gravatar_id":"","url":"https://api.github.com/users/bradleyfalzon","html_url":"https://github.com/bradleyfalzon","followers_url":"https://api.github.com/users/bradleyfalzon/followers","following_url":"https://api.github.com/users/bradleyfalzon/following{/other_user}","gists_url":"https://api.github.com/users/bradleyfalzon/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleyfalzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleyfalzon/subscriptions","organizations_url":"https://api.github.com/users/bradleyfalzon/orgs","repos_url":"https://api.github.com/users/bradleyfalzon/repos","events_url":"https://api.github.com/users/bradleyfalzon/events{/privacy}","received_events_url":"https://api.github.com/users/bradleyfalzon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bradleyfalzon/m3u8","description":"Parser and generator of M3U8-playlists for Apple HLS.","fork":true,"url":"https://api.github.com/repos/bradleyfalzon/m3u8","forks_url":"https://api.github.com/repos/bradleyfalzon/m3u8/forks","keys_url":"https://api.github.com/repos/bradleyfalzon/m3u8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bradleyfalzon/m3u8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bradleyfalzon/m3u8/teams","hooks_url":"https://api.github.com/repos/bradleyfalzon/m3u8/hooks","issue_events_url":"https://api.github.com/repos/bradleyfalzon/m3u8/issues/events{/number}","events_url":"https://api.github.com/repos/bradleyfalzon/m3u8/events","assignees_url":"https://api.github.com/repos/bradleyfalzon/m3u8/assignees{/user}","branches_url":"https://api.github.com/repos/bradleyfalzon/m3u8/branches{/branch}","tags_url":"https://api.github.com/repos/bradleyfalzon/m3u8/tags","blobs_url":"https://api.github.com/repos/bradleyfalzon/m3u8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bradleyfalzon/m3u8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bradleyfalzon/m3u8/git/refs{/sha}","trees_url":"https://api.github.com/repos/bradleyfalzon/m3u8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bradleyfalzon/m3u8/statuses/{sha}","languages_url":"https://api.github.com/repos/bradleyfalzon/m3u8/languages","stargazers_url":"https://api.github.com/repos/bradleyfalzon/m3u8/stargazers","contributors_url":"https://api.github.com/repos/bradleyfalzon/m3u8/contributors","subscribers_url":"https://api.github.com/repos/bradleyfalzon/m3u8/subscribers","subscription_url":"https://api.github.com/repos/bradleyfalzon/m3u8/subscription","commits_url":"https://api.github.com/repos/bradleyfalzon/m3u8/commits{/sha}","git_commits_url":"https://api.github.com/repos/bradleyfalzon/m3u8/git/commits{/sha}","comments_url":"https://api.github.com/repos/bradleyfalzon/m3u8/comments{/number}","issue_comment_url":"https://api.github.com/repos/bradleyfalzon/m3u8/issues/comments{/number}","contents_url":"https://api.github.com/repos/bradleyfalzon/m3u8/contents/{+path}","compare_url":"https://api.github.com/repos/bradleyfalzon/m3u8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bradleyfalzon/m3u8/merges","archive_url":"https://api.github.com/repos/bradleyfalzon/m3u8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bradleyfalzon/m3u8/downloads","issues_url":"https://api.github.com/repos/bradleyfalzon/m3u8/issues{/number}","pulls_url":"https://api.github.com/repos/bradleyfalzon/m3u8/pulls{/number}","milestones_url":"https://api.github.com/repos/bradleyfalzon/m3u8/milestones{/number}","notifications_url":"https://api.github.com/repos/bradleyfalzon/m3u8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bradleyfalzon/m3u8/labels{/name}","releases_url":"https://api.github.com/repos/bradleyfalzon/m3u8/releases{/id}","deployments_url":"https://api.github.com/repos/bradleyfalzon/m3u8/deployments","created_at":"2016-03-20T21:20:49Z","updated_at":"2016-03-20T21:20:50Z","pushed_at":"2016-06-06T01:14:41Z","git_url":"git://github.com/bradleyfalzon/m3u8.git","ssh_url":"git@github.com:bradleyfalzon/m3u8.git","clone_url":"https://github.com/bradleyfalzon/m3u8.git","svn_url":"https://github.com/bradleyfalzon/m3u8","homepage":"http://tools.ietf.org/html/draft-pantos-http-live-streaming","size":611,"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":"grafov:master","ref":"master","sha":"47fd7c396c804f91c8359e6d0eaea02c3e6391b6","user":{"login":"grafov","id":607056,"avatar_url":"https://avatars.githubusercontent.com/u/607056?v=3","gravatar_id":"","url":"https://api.github.com/users/grafov","html_url":"https://github.com/grafov","followers_url":"https://api.github.com/users/grafov/followers","following_url":"https://api.github.com/users/grafov/following{/other_user}","gists_url":"https://api.github.com/users/grafov/gists{/gist_id}","starred_url":"https://api.github.com/users/grafov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grafov/subscriptions","organizations_url":"https://api.github.com/users/grafov/orgs","repos_url":"https://api.github.com/users/grafov/repos","events_url":"https://api.github.com/users/grafov/events{/privacy}","received_events_url":"https://api.github.com/users/grafov/received_events","type":"User","site_admin":false},"repo":{"id":8039629,"name":"m3u8","full_name":"grafov/m3u8","owner":{"login":"grafov","id":607056,"avatar_url":"https://avatars.githubusercontent.com/u/607056?v=3","gravatar_id":"","url":"https://api.github.com/users/grafov","html_url":"https://github.com/grafov","followers_url":"https://api.github.com/users/grafov/followers","following_url":"https://api.github.com/users/grafov/following{/other_user}","gists_url":"https://api.github.com/users/grafov/gists{/gist_id}","starred_url":"https://api.github.com/users/grafov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grafov/subscriptions","organizations_url":"https://api.github.com/users/grafov/orgs","repos_url":"https://api.github.com/users/grafov/repos","events_url":"https://api.github.com/users/grafov/events{/privacy}","received_events_url":"https://api.github.com/users/grafov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grafov/m3u8","description":"Parser and generator of M3U8-playlists for Apple HLS. Library for Go language.","fork":false,"url":"https://api.github.com/repos/grafov/m3u8","forks_url":"https://api.github.com/repos/grafov/m3u8/forks","keys_url":"https://api.github.com/repos/grafov/m3u8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grafov/m3u8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grafov/m3u8/teams","hooks_url":"https://api.github.com/repos/grafov/m3u8/hooks","issue_events_url":"https://api.github.com/repos/grafov/m3u8/issues/events{/number}","events_url":"https://api.github.com/repos/grafov/m3u8/events","assignees_url":"https://api.github.com/repos/grafov/m3u8/assignees{/user}","branches_url":"https://api.github.com/repos/grafov/m3u8/branches{/branch}","tags_url":"https://api.github.com/repos/grafov/m3u8/tags","blobs_url":"https://api.github.com/repos/grafov/m3u8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grafov/m3u8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grafov/m3u8/git/refs{/sha}","trees_url":"https://api.github.com/repos/grafov/m3u8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grafov/m3u8/statuses/{sha}","languages_url":"https://api.github.com/repos/grafov/m3u8/languages","stargazers_url":"https://api.github.com/repos/grafov/m3u8/stargazers","contributors_url":"https://api.github.com/repos/grafov/m3u8/contributors","subscribers_url":"https://api.github.com/repos/grafov/m3u8/subscribers","subscription_url":"https://api.github.com/repos/grafov/m3u8/subscription","commits_url":"https://api.github.com/repos/grafov/m3u8/commits{/sha}","git_commits_url":"https://api.github.com/repos/grafov/m3u8/git/commits{/sha}","comments_url":"https://api.github.com/repos/grafov/m3u8/comments{/number}","issue_comment_url":"https://api.github.com/repos/grafov/m3u8/issues/comments{/number}","contents_url":"https://api.github.com/repos/grafov/m3u8/contents/{+path}","compare_url":"https://api.github.com/repos/grafov/m3u8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grafov/m3u8/merges","archive_url":"https://api.github.com/repos/grafov/m3u8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grafov/m3u8/downloads","issues_url":"https://api.github.com/repos/grafov/m3u8/issues{/number}","pulls_url":"https://api.github.com/repos/grafov/m3u8/pulls{/number}","milestones_url":"https://api.github.com/repos/grafov/m3u8/milestones{/number}","notifications_url":"https://api.github.com/repos/grafov/m3u8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grafov/m3u8/labels{/name}","releases_url":"https://api.github.com/repos/grafov/m3u8/releases{/id}","deployments_url":"https://api.github.com/repos/grafov/m3u8/deployments","created_at":"2013-02-05T22:26:30Z","updated_at":"2016-06-04T08:51:48Z","pushed_at":"2016-06-06T01:18:26Z","git_url":"git://github.com/grafov/m3u8.git","ssh_url":"git@github.com:grafov/m3u8.git","clone_url":"https://github.com/grafov/m3u8.git","svn_url":"https://github.com/grafov/m3u8","homepage":"http://tools.ietf.org/html/draft-pantos-http-live-streaming","size":657,"stargazers_count":163,"watchers_count":163,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":9,"forks":50,"open_issues":9,"watchers":163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grafov/m3u8/pulls/58"},"html":{"href":"https://github.com/grafov/m3u8/pull/58"},"issue":{"href":"https://api.github.com/repos/grafov/m3u8/issues/58"},"comments":{"href":"https://api.github.com/repos/grafov/m3u8/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/grafov/m3u8/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/grafov/m3u8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grafov/m3u8/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/grafov/m3u8/statuses/14d0059fa2229184060b4d29dbd28b17c751ee6e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bradleyfalzon","id":1834577,"avatar_url":"https://avatars.githubusercontent.com/u/1834577?v=3","gravatar_id":"","url":"https://api.github.com/users/bradleyfalzon","html_url":"https://github.com/bradleyfalzon","followers_url":"https://api.github.com/users/bradleyfalzon/followers","following_url":"https://api.github.com/users/bradleyfalzon/following{/other_user}","gists_url":"https://api.github.com/users/bradleyfalzon/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleyfalzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleyfalzon/subscriptions","organizations_url":"https://api.github.com/users/bradleyfalzon/orgs","repos_url":"https://api.github.com/users/bradleyfalzon/repos","events_url":"https://api.github.com/users/bradleyfalzon/events{/privacy}","received_events_url":"https://api.github.com/users/bradleyfalzon/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":5,"additions":155,"deletions":71,"changed_files":4}}
{"actor":{"display_login":"bradleyfalzon"}}