{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/immutable-js/issues/360","labels_url":"https://api.github.com/repos/facebook/immutable-js/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/facebook/immutable-js/issues/360/comments","events_url":"https://api.github.com/repos/facebook/immutable-js/issues/360/events","html_url":"https://github.com/facebook/immutable-js/issues/360","id":59575793,"number":360,"title":"When are hashes calculated or can traversal done by `.equals` be reused for further comparison.","user":{"login":"Gozala","id":21236,"avatar_url":"https://avatars.githubusercontent.com/u/21236?v=3","gravatar_id":"","url":"https://api.github.com/users/Gozala","html_url":"https://github.com/Gozala","followers_url":"https://api.github.com/users/Gozala/followers","following_url":"https://api.github.com/users/Gozala/following{/other_user}","gists_url":"https://api.github.com/users/Gozala/gists{/gist_id}","starred_url":"https://api.github.com/users/Gozala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gozala/subscriptions","organizations_url":"https://api.github.com/users/Gozala/orgs","repos_url":"https://api.github.com/users/Gozala/repos","events_url":"https://api.github.com/users/Gozala/events{/privacy}","received_events_url":"https://api.github.com/users/Gozala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-03T00:22:29Z","updated_at":"2015-03-03T00:22:29Z","closed_at":null,"body":"Omniscient (http://omniscientjs.github.io) that is react interface that embraces immutable.js and cursors provides custom implementation of `shouldComponentUpdate` to avoid re-renders unless where not necessary. Although it's implementation instead of differing comparison to `.equals` seems to prefer reference checks (you can ifnd relevant discussion https://github.com/omniscientjs/omniscient/issues/76).\r\n\r\nI do believe there is an assumption that letting .equals run comparison on non-equal data structures may end up costing more than just re-triggering re renders.\r\n\r\nI was assuming hashes were calculated during `.equals` but I was wrong, which got me thinking if there is a way to reuse comparison done on the root components for components down the pipe. What I mean if update has happened 10 level deep in the data structure, it will likely end up traversing same structure several time to do same comparison over, would be nice if somehow first traversal could be reused to optimise subsequent comparisons."}}