{"action":"created","issue":{"url":"https://api.github.com/repos/styled-components/styled-components/issues/931","repository_url":"https://api.github.com/repos/styled-components/styled-components","labels_url":"https://api.github.com/repos/styled-components/styled-components/issues/931/labels{/name}","comments_url":"https://api.github.com/repos/styled-components/styled-components/issues/931/comments","events_url":"https://api.github.com/repos/styled-components/styled-components/issues/931/events","html_url":"https://github.com/styled-components/styled-components/issues/931","id":236888836,"number":931,"title":"createBroadcast implementation causes performance issues","user":{"login":"IIIristraM","id":2033959,"avatar_url":"https://avatars2.githubusercontent.com/u/2033959?v=3","gravatar_id":"","url":"https://api.github.com/users/IIIristraM","html_url":"https://github.com/IIIristraM","followers_url":"https://api.github.com/users/IIIristraM/followers","following_url":"https://api.github.com/users/IIIristraM/following{/other_user}","gists_url":"https://api.github.com/users/IIIristraM/gists{/gist_id}","starred_url":"https://api.github.com/users/IIIristraM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IIIristraM/subscriptions","organizations_url":"https://api.github.com/users/IIIristraM/orgs","repos_url":"https://api.github.com/users/IIIristraM/repos","events_url":"https://api.github.com/users/IIIristraM/events{/privacy}","received_events_url":"https://api.github.com/users/IIIristraM/received_events","type":"User","site_admin":false},"labels":[{"id":425493751,"url":"https://api.github.com/repos/styled-components/styled-components/labels/enhancement","name":"enhancement","color":"0096D1","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-19T13:21:45Z","updated_at":"2017-06-26T08:46:46Z","closed_at":null,"body":"this lines\r\n```\r\nreturn () => {\r\n    listeners = listeners.filter(item => item !== listener)\r\n }\r\n```\r\nproduce a lot of new objects which leads to a frequent garbage collections, which take sometimes up to 250 ms.\r\n\r\nthis can be probably avoided by changing `listeners` from array to a simple hash object like {  [id]: listner }, and the lines above to\r\n\r\n```\r\nreturn () => {\r\n    delete listeners[id]\r\n }\r\n```"},"comment":{"url":"https://api.github.com/repos/styled-components/styled-components/issues/comments/310999484","html_url":"https://github.com/styled-components/styled-components/issues/931#issuecomment-310999484","issue_url":"https://api.github.com/repos/styled-components/styled-components/issues/931","id":310999484,"user":{"login":"vesparny","id":82070,"avatar_url":"https://avatars0.githubusercontent.com/u/82070?v=3","gravatar_id":"","url":"https://api.github.com/users/vesparny","html_url":"https://github.com/vesparny","followers_url":"https://api.github.com/users/vesparny/followers","following_url":"https://api.github.com/users/vesparny/following{/other_user}","gists_url":"https://api.github.com/users/vesparny/gists{/gist_id}","starred_url":"https://api.github.com/users/vesparny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vesparny/subscriptions","organizations_url":"https://api.github.com/users/vesparny/orgs","repos_url":"https://api.github.com/users/vesparny/repos","events_url":"https://api.github.com/users/vesparny/events{/privacy}","received_events_url":"https://api.github.com/users/vesparny/received_events","type":"User","site_admin":false},"created_at":"2017-06-26T08:46:46Z","updated_at":"2017-06-26T08:46:46Z","body":"I suspect what a bout using splice?\r\n\r\n```js\r\nlisteners.splice(listeners.indexOf(listener), 1)\r\n```\r\n"}}
{"actor":{"display_login":"vesparny"}}