{"action":"created","issue":{"url":"https://api.github.com/repos/fzzy/radix/issues/63","labels_url":"https://api.github.com/repos/fzzy/radix/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/fzzy/radix/issues/63/comments","events_url":"https://api.github.com/repos/fzzy/radix/issues/63/events","html_url":"https://github.com/fzzy/radix/issues/63","id":74188469,"number":63,"title":"Excessive Memory Allocations and High Latency?","user":{"login":"phillipCouto","id":382715,"avatar_url":"https://avatars.githubusercontent.com/u/382715?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipCouto","html_url":"https://github.com/phillipCouto","followers_url":"https://api.github.com/users/phillipCouto/followers","following_url":"https://api.github.com/users/phillipCouto/following{/other_user}","gists_url":"https://api.github.com/users/phillipCouto/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipCouto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipCouto/subscriptions","organizations_url":"https://api.github.com/users/phillipCouto/orgs","repos_url":"https://api.github.com/users/phillipCouto/repos","events_url":"https://api.github.com/users/phillipCouto/events{/privacy}","received_events_url":"https://api.github.com/users/phillipCouto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-08T01:34:54Z","updated_at":"2015-05-08T16:51:54Z","closed_at":null,"body":"Hi Guys so I am starting to use redis in our environment for in memory database and caching but one thing that has held me back from fully adopting it for caching was the performance from using radix as the client and the increase in time to process requests. \r\n\r\nNow I know since we are communicating over the wire there is network latency but I am seeing 3-4 ms response times just to set a key in redis.\r\nAlso running a simple benchmark for set command here are my results:\r\n```\r\nBenchmarkSet\t     300\t   3952940 ns/op\t    3794 B/op\t      38 allocs/op\r\n```\r\n\r\nThe redis instance is running on a boot2docker vm as a container on the same machine as the benchmarking code.\r\n\r\nThe code for the benchmark was:\r\n```Go\r\nfunc BenchmarkSet(b *testing.B) {\r\n\tc, err := redis.Dial(\"tcp\", \"127.0.0.1:32768\")\r\n\tif err != nil {\r\n\t\tb.Fatal(err)\r\n\t}\r\n\tdefer c.Close()\r\n\r\n\tfor i := 0; i < b.N; i++ {\r\n\t\tresp := c.Cmd(\"SET\", fmt.Sprintf(\"key%v\", i), i)\r\n\t\tif resp.Err != nil {\r\n\t\t\tb.Fatal(resp.Err)\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\nI know there are other libraries out there but I prefer the API of radix and would like to help if this issue is seen as legit amongst other users.\r\n\r\nAm I alone on this issue?"},"comment":{"url":"https://api.github.com/repos/fzzy/radix/issues/comments/100295270","html_url":"https://github.com/fzzy/radix/issues/63#issuecomment-100295270","issue_url":"https://api.github.com/repos/fzzy/radix/issues/63","id":100295270,"user":{"login":"phillipCouto","id":382715,"avatar_url":"https://avatars.githubusercontent.com/u/382715?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipCouto","html_url":"https://github.com/phillipCouto","followers_url":"https://api.github.com/users/phillipCouto/followers","following_url":"https://api.github.com/users/phillipCouto/following{/other_user}","gists_url":"https://api.github.com/users/phillipCouto/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipCouto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipCouto/subscriptions","organizations_url":"https://api.github.com/users/phillipCouto/orgs","repos_url":"https://api.github.com/users/phillipCouto/repos","events_url":"https://api.github.com/users/phillipCouto/events{/privacy}","received_events_url":"https://api.github.com/users/phillipCouto/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T16:51:54Z","updated_at":"2015-05-08T16:51:54Z","body":"That is interesting how redigo is faster than your BenchmarkSetFaster which seems very raw to the naked eye."}}