{"action":"created","issue":{"url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/396","repository_url":"https://api.github.com/repos/DevExpress/devextreme-reactive","labels_url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/396/comments","events_url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/396/events","html_url":"https://github.com/DevExpress/devextreme-reactive/issues/396","id":264569608,"node_id":"MDU6SXNzdWUyNjQ1Njk2MDg=","number":396,"title":"High Performance Live Updates & Redux/Immutability","user":{"login":"DanHarman","id":1155948,"node_id":"MDQ6VXNlcjExNTU5NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1155948?v=4","gravatar_id":"","url":"https://api.github.com/users/DanHarman","html_url":"https://github.com/DanHarman","followers_url":"https://api.github.com/users/DanHarman/followers","following_url":"https://api.github.com/users/DanHarman/following{/other_user}","gists_url":"https://api.github.com/users/DanHarman/gists{/gist_id}","starred_url":"https://api.github.com/users/DanHarman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanHarman/subscriptions","organizations_url":"https://api.github.com/users/DanHarman/orgs","repos_url":"https://api.github.com/users/DanHarman/repos","events_url":"https://api.github.com/users/DanHarman/events{/privacy}","received_events_url":"https://api.github.com/users/DanHarman/received_events","type":"User","site_admin":false},"labels":[{"id":562812862,"node_id":"MDU6TGFiZWw1NjI4MTI4NjI=","url":"https://api.github.com/repos/DevExpress/devextreme-reactive/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"kvet","id":929987,"node_id":"MDQ6VXNlcjkyOTk4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/929987?v=4","gravatar_id":"","url":"https://api.github.com/users/kvet","html_url":"https://github.com/kvet","followers_url":"https://api.github.com/users/kvet/followers","following_url":"https://api.github.com/users/kvet/following{/other_user}","gists_url":"https://api.github.com/users/kvet/gists{/gist_id}","starred_url":"https://api.github.com/users/kvet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvet/subscriptions","organizations_url":"https://api.github.com/users/kvet/orgs","repos_url":"https://api.github.com/users/kvet/repos","events_url":"https://api.github.com/users/kvet/events{/privacy}","received_events_url":"https://api.github.com/users/kvet/received_events","type":"User","site_admin":false},"assignees":[{"login":"kvet","id":929987,"node_id":"MDQ6VXNlcjkyOTk4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/929987?v=4","gravatar_id":"","url":"https://api.github.com/users/kvet","html_url":"https://github.com/kvet","followers_url":"https://api.github.com/users/kvet/followers","following_url":"https://api.github.com/users/kvet/following{/other_user}","gists_url":"https://api.github.com/users/kvet/gists{/gist_id}","starred_url":"https://api.github.com/users/kvet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvet/subscriptions","organizations_url":"https://api.github.com/users/kvet/orgs","repos_url":"https://api.github.com/users/kvet/repos","events_url":"https://api.github.com/users/kvet/events{/privacy}","received_events_url":"https://api.github.com/users/kvet/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2017-10-11T12:37:39Z","updated_at":"2018-12-10T12:12:51Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nDo you have a recommended approach for frequent live updates to a large number of rows? e.g. live stock price updates for several thousand rows?\r\n\r\nThe recommended approach from Dan Abramov is to make the store fully normalised e.g.:\r\n\r\n```\r\n{\r\n    images : {\r\n        byId : {\r\n            \"1234\" : { _id: '1234', path: '/path/to/image1234.jpg', thumb: '/path/to/thumb1234.jpg' },\r\n            \"1235\" : { _id: '1235', path: '/path/to/image1235.jpg', thumb: '/path/to/thumb1235.jpg' },\r\n        },\r\n        allImages : [\"1234\", \"1235\"],\r\n    },\r\n}\r\n```\r\ni.e. separating out the list of item from the items. themselves The principal being that if you are binding a grid then the grid component would be `connect`ed to `allImages` and then each visible row component would be `connect`ed to the store directly so they can do a cheap reference comparison of their row data to detect changes to their particular entity via `mapStateToProps`. This means the grid only needs to consider rows that have changed rather than all rows.\r\n\r\n e.g.: (and excuse the data model change, I'm pasting from differing examples)\r\n\r\n```\r\nconst makeMapStateToProps = (initialState, initialProps) => {\r\n  const { id } = initialProps\r\n  const mapStateToProps = (state) => {\r\n    const { todos } = state\r\n    const todo = todos.byId[id]\r\n    const relatedTodo = todo.relatedId && todos.byId[todo.relatedId]\r\n    return {\r\n      todo,\r\n      relatedTodo\r\n    }\r\n  }\r\n  return mapStateToProps\r\n}\r\n\r\nexport default connect(\r\n  makeMapStateToProps\r\n)(TodoItem)\r\n```\r\n\r\nThis is more fully explained here https://github.com/reactjs/redux/issues/1751 and a fuller example can be found here: https://github.com/mweststrate/redux-todomvc. These are where I lifted the example code from.\r\n\r\nAnyway in the context of your ReactGrid, I don't really see how to use this approach since there doesn't appear to be a row component to connect, so I would have to modify the rows property every time. This would seem to imply you need to do a list comparison on every update which is going to be expensive.\r\n\r\nThoughts and recommendations much appreciated. At the very least, is there a way to efficiently communicate a row update to the grid?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/comments/445794793","html_url":"https://github.com/DevExpress/devextreme-reactive/issues/396#issuecomment-445794793","issue_url":"https://api.github.com/repos/DevExpress/devextreme-reactive/issues/396","id":445794793,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTc5NDc5Mw==","user":{"login":"gwmaster","id":5362853,"node_id":"MDQ6VXNlcjUzNjI4NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5362853?v=4","gravatar_id":"","url":"https://api.github.com/users/gwmaster","html_url":"https://github.com/gwmaster","followers_url":"https://api.github.com/users/gwmaster/followers","following_url":"https://api.github.com/users/gwmaster/following{/other_user}","gists_url":"https://api.github.com/users/gwmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/gwmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwmaster/subscriptions","organizations_url":"https://api.github.com/users/gwmaster/orgs","repos_url":"https://api.github.com/users/gwmaster/repos","events_url":"https://api.github.com/users/gwmaster/events{/privacy}","received_events_url":"https://api.github.com/users/gwmaster/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T12:12:51Z","updated_at":"2018-12-10T12:12:51Z","author_association":"NONE","body":"Hi its cool and solve my problem of performance.\r\nbut i cant use CustomTreeData on getChildRows\r\nconst getChildRows = (row, rootRows) => {\r\n}; \r\nrow is always null\r\n\r\ncan you build some basic example how create Tree Data using getCellValue thank you "}}
{"actor":{"display_login":"gwmaster"}}