{"action":"opened","issue":{"url":"https://api.github.com/repos/reduxjs/reselect/issues/380","repository_url":"https://api.github.com/repos/reduxjs/reselect","labels_url":"https://api.github.com/repos/reduxjs/reselect/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/reduxjs/reselect/issues/380/comments","events_url":"https://api.github.com/repos/reduxjs/reselect/issues/380/events","html_url":"https://github.com/reduxjs/reselect/issues/380","id":370338843,"node_id":"MDU6SXNzdWUzNzAzMzg4NDM=","number":380,"title":"Re-calculation when adding new item","user":{"login":"raRaRa","id":4303914,"node_id":"MDQ6VXNlcjQzMDM5MTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4303914?v=4","gravatar_id":"","url":"https://api.github.com/users/raRaRa","html_url":"https://github.com/raRaRa","followers_url":"https://api.github.com/users/raRaRa/followers","following_url":"https://api.github.com/users/raRaRa/following{/other_user}","gists_url":"https://api.github.com/users/raRaRa/gists{/gist_id}","starred_url":"https://api.github.com/users/raRaRa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raRaRa/subscriptions","organizations_url":"https://api.github.com/users/raRaRa/orgs","repos_url":"https://api.github.com/users/raRaRa/repos","events_url":"https://api.github.com/users/raRaRa/events{/privacy}","received_events_url":"https://api.github.com/users/raRaRa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T20:51:59Z","updated_at":"2018-10-15T20:51:59Z","closed_at":null,"author_association":"NONE","body":"I'm using `reselect` to create various selectors for React + Redux. The problem I'm facing is that when I have over 500k items, the selector calculation might take from 500ms to 800ms, since it has to filter and sort through 500k items with complex checks. I could probably increase the performance further, but I wanted to ask a few questions first.\r\n\r\nI'm using normalized state in Redux, where I have the items stored in `byIds`, and the ids in `allIds`. This is fine. However, when I add a new item, `byIds` and `allIds` will be updated, meaning that the selector will have to re-calculate all the 500k items again, instead of just running it for the new item.\r\n\r\nIs there some smart way to solve this, or something I'm missing?\r\n\r\nThanks.\r\n"}}
{"actor":{"display_login":"raRaRa"}}