{"action":"closed","issue":{"url":"https://api.github.com/repos/socketio/socket.io/issues/2079","labels_url":"https://api.github.com/repos/socketio/socket.io/issues/2079/labels{/name}","comments_url":"https://api.github.com/repos/socketio/socket.io/issues/2079/comments","events_url":"https://api.github.com/repos/socketio/socket.io/issues/2079/events","html_url":"https://github.com/socketio/socket.io/issues/2079","id":67708342,"number":2079,"title":"this.sockets.indexOf is O(n) ? is there a reason to not use a hash array instead ?","user":{"login":"kapouer","id":131406,"avatar_url":"https://avatars.githubusercontent.com/u/131406?v=3","gravatar_id":"","url":"https://api.github.com/users/kapouer","html_url":"https://github.com/kapouer","followers_url":"https://api.github.com/users/kapouer/followers","following_url":"https://api.github.com/users/kapouer/following{/other_user}","gists_url":"https://api.github.com/users/kapouer/gists{/gist_id}","starred_url":"https://api.github.com/users/kapouer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapouer/subscriptions","organizations_url":"https://api.github.com/users/kapouer/orgs","repos_url":"https://api.github.com/users/kapouer/repos","events_url":"https://api.github.com/users/kapouer/events{/privacy}","received_events_url":"https://api.github.com/users/kapouer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/socketio/socket.io/labels/Performance","name":"Performance","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-11T00:09:26Z","updated_at":"2016-01-17T13:09:55Z","closed_at":"2016-01-17T13:09:55Z","body":"Hi,\r\nwhen trying to figure out why latest socket.io has CPU load climbing a bit too fast (70% on one core with around 5.000 clients), this was found:\r\nhttps://github.com/Automattic/socket.io/blob/916872587fd6e0280e9538f712b91d0460bc3a2b/lib/namespace.js#L191\r\nbefore i try to see if that can be optimized, i'd welcome some advice from the author(s), please."}}