{"action":"created","issue":{"url":"https://api.github.com/repos/miekg/dns/issues/224","labels_url":"https://api.github.com/repos/miekg/dns/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/miekg/dns/issues/224/comments","events_url":"https://api.github.com/repos/miekg/dns/issues/224/events","html_url":"https://github.com/miekg/dns/pull/224","id":90761505,"number":224,"title":"Added function for lazy message reading per #222","user":{"login":"asergeyev","id":715656,"avatar_url":"https://avatars.githubusercontent.com/u/715656?v=3","gravatar_id":"","url":"https://api.github.com/users/asergeyev","html_url":"https://github.com/asergeyev","followers_url":"https://api.github.com/users/asergeyev/followers","following_url":"https://api.github.com/users/asergeyev/following{/other_user}","gists_url":"https://api.github.com/users/asergeyev/gists{/gist_id}","starred_url":"https://api.github.com/users/asergeyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asergeyev/subscriptions","organizations_url":"https://api.github.com/users/asergeyev/orgs","repos_url":"https://api.github.com/users/asergeyev/repos","events_url":"https://api.github.com/users/asergeyev/events{/privacy}","received_events_url":"https://api.github.com/users/asergeyev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-24T19:12:47Z","updated_at":"2015-07-01T13:38:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/miekg/dns/pulls/224","html_url":"https://github.com/miekg/dns/pull/224","diff_url":"https://github.com/miekg/dns/pull/224.diff","patch_url":"https://github.com/miekg/dns/pull/224.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/miekg/dns/issues/comments/117679483","html_url":"https://github.com/miekg/dns/pull/224#issuecomment-117679483","issue_url":"https://api.github.com/repos/miekg/dns/issues/224","id":117679483,"user":{"login":"asergeyev","id":715656,"avatar_url":"https://avatars.githubusercontent.com/u/715656?v=3","gravatar_id":"","url":"https://api.github.com/users/asergeyev","html_url":"https://github.com/asergeyev","followers_url":"https://api.github.com/users/asergeyev/followers","following_url":"https://api.github.com/users/asergeyev/following{/other_user}","gists_url":"https://api.github.com/users/asergeyev/gists{/gist_id}","starred_url":"https://api.github.com/users/asergeyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asergeyev/subscriptions","organizations_url":"https://api.github.com/users/asergeyev/orgs","repos_url":"https://api.github.com/users/asergeyev/repos","events_url":"https://api.github.com/users/asergeyev/events{/privacy}","received_events_url":"https://api.github.com/users/asergeyev/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T13:38:18Z","updated_at":"2015-07-01T13:38:18Z","body":"I created new clientbench branch and put some test code there... As expected, UDP is close, almost no difference but TCP is faster in new implementation (not reserving 64K each time):\r\n\r\n\tBenchmarkNewUDPClient\t   10000\t    342285 ns/op\r\n\tBenchmarkOldUDPClient\t    5000\t    347112 ns/op\r\n\tBenchmarkNewTCPClient\t   10000\t    132508 ns/op\r\n\tBenchmarkOldTCPClient\t   10000\t    202532 ns/op\r\n\r\nWith pprof and web -cum BenchmarkName it looks that most CPU time was still on syscalls... and pack/unpack StructValue;  I decided to stub all of those, wrote small fake net.Conn for that... (second commit in that branch)... I also changed UDPSize to 4096 and run it with benchtime=10s to make sure I'll have small CPU expenses visible (paranoid Alex).\r\n\r\nHere is what it looks like for \"web -cum ReadMsg\" only on new client test:\r\n\r\n     https://www.dropbox.com/s/3iw1o23ytnksvie/pprof0002.svg?dl=1\r\n\r\nYou can see there is almost no time spent where you think we can win something.\r\n\r\n"}}