{"action":"created","issue":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/835","labels_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/835/labels{/name}","comments_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/835/comments","events_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/835/events","html_url":"https://github.com/NodeRedis/node_redis/pull/835","id":106174258,"number":835,"title":"Remove send_command safety checks","user":{"login":"BridgeAR","id":8822573,"avatar_url":"https://avatars.githubusercontent.com/u/8822573?v=3","gravatar_id":"","url":"https://api.github.com/users/BridgeAR","html_url":"https://github.com/BridgeAR","followers_url":"https://api.github.com/users/BridgeAR/followers","following_url":"https://api.github.com/users/BridgeAR/following{/other_user}","gists_url":"https://api.github.com/users/BridgeAR/gists{/gist_id}","starred_url":"https://api.github.com/users/BridgeAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BridgeAR/subscriptions","organizations_url":"https://api.github.com/users/BridgeAR/orgs","repos_url":"https://api.github.com/users/BridgeAR/repos","events_url":"https://api.github.com/users/BridgeAR/events{/privacy}","received_events_url":"https://api.github.com/users/BridgeAR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NodeRedis/node_redis/labels/2.0","name":"2.0","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-12T17:48:57Z","updated_at":"2015-09-13T13:16:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NodeRedis/node_redis/pulls/835","html_url":"https://github.com/NodeRedis/node_redis/pull/835","diff_url":"https://github.com/NodeRedis/node_redis/pull/835.diff","patch_url":"https://github.com/NodeRedis/node_redis/pull/835.patch"},"body":"This checks are only important for users who use send_command directly instead of using the convenience method.\r\nAs the readme clearly states how send_command should work and any user would have run into errors if misused, these checks can be removed. If any user might misuse the function anyway, it is very likely that another error will be thrown because of that"},"comment":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/comments/139873256","html_url":"https://github.com/NodeRedis/node_redis/pull/835#issuecomment-139873256","issue_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/835","id":139873256,"user":{"login":"BridgeAR","id":8822573,"avatar_url":"https://avatars.githubusercontent.com/u/8822573?v=3","gravatar_id":"","url":"https://api.github.com/users/BridgeAR","html_url":"https://github.com/BridgeAR","followers_url":"https://api.github.com/users/BridgeAR/followers","following_url":"https://api.github.com/users/BridgeAR/following{/other_user}","gists_url":"https://api.github.com/users/BridgeAR/gists{/gist_id}","starred_url":"https://api.github.com/users/BridgeAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BridgeAR/subscriptions","organizations_url":"https://api.github.com/users/BridgeAR/orgs","repos_url":"https://api.github.com/users/BridgeAR/repos","events_url":"https://api.github.com/users/BridgeAR/events{/privacy}","received_events_url":"https://api.github.com/users/BridgeAR/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T13:16:31Z","updated_at":"2015-09-13T13:16:31Z","body":"@bcoe using send_command directly should not often be the case but all other users and commands run through these safety checks. It should not impact the speed a lot (I did not run any benchmark as I could not think of a proper way to write a benchmark that would only test these statements. The multi_bench benchmark is not reliable on (the output varies a lot by each run and v8 is probably optimizing a lot away) but it should be a tiny bit.\r\nI tried out all possibilities that we prevent users from doing wrong and all are going to throw errors at some point.\r\nAs this makes the code better to read and is a small speedup in most cases I think it's reasonable to merge this."}}