{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/normalizr/issues/82","repository_url":"https://api.github.com/repos/gaearon/normalizr","labels_url":"https://api.github.com/repos/gaearon/normalizr/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/normalizr/issues/82/comments","events_url":"https://api.github.com/repos/gaearon/normalizr/issues/82/events","html_url":"https://github.com/gaearon/normalizr/pull/82","id":144640975,"number":82,"title":"Fix Safari GC issue by removing mapValues() in favor of Object.keys().reduce()","user":{"login":"paularmstrong","id":33297,"avatar_url":"https://avatars.githubusercontent.com/u/33297?v=3","gravatar_id":"","url":"https://api.github.com/users/paularmstrong","html_url":"https://github.com/paularmstrong","followers_url":"https://api.github.com/users/paularmstrong/followers","following_url":"https://api.github.com/users/paularmstrong/following{/other_user}","gists_url":"https://api.github.com/users/paularmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/paularmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paularmstrong/subscriptions","organizations_url":"https://api.github.com/users/paularmstrong/orgs","repos_url":"https://api.github.com/users/paularmstrong/repos","events_url":"https://api.github.com/users/paularmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/paularmstrong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2016-03-30T16:12:06Z","updated_at":"2016-03-30T19:15:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gaearon/normalizr/pulls/82","html_url":"https://github.com/gaearon/normalizr/pull/82","diff_url":"https://github.com/gaearon/normalizr/pull/82.diff","patch_url":"https://github.com/gaearon/normalizr/pull/82.patch"},"body":"# Problem\r\n\r\nSee the gist: [Safari GC Issue: Normalizr + Lodash](https://gist.github.com/paularmstrong/02330d28dbe202a3aa8cd688473a1919) (credit to @alunny)\r\n\r\nSummary: normalizr + lodash in Safari appears to encounter a problem sometimes in which Safari's garbage collector interrupts the entity mapping, causing the entities object to be empty.\r\n\r\n# Solution\r\n\r\nThis is sort of a half-way-there solution, because the ultimate goal would be to remove all production dependencies. However, `isEqual`/deep-equality is not an easy problem to solve and lodash's implementation is the best available.\r\n\r\n* Removes `lodash` dependency\r\n* Uses `lodash.isequal` package for `isEqual`\r\n* Adds an `isObject` util method\r\n* Refactors use of `lodash/mapValues`"},"comment":{"url":"https://api.github.com/repos/gaearon/normalizr/issues/comments/203590718","html_url":"https://github.com/gaearon/normalizr/pull/82#issuecomment-203590718","issue_url":"https://api.github.com/repos/gaearon/normalizr/issues/82","id":203590718,"user":{"login":"alunny","id":48361,"avatar_url":"https://avatars.githubusercontent.com/u/48361?v=3","gravatar_id":"","url":"https://api.github.com/users/alunny","html_url":"https://github.com/alunny","followers_url":"https://api.github.com/users/alunny/followers","following_url":"https://api.github.com/users/alunny/following{/other_user}","gists_url":"https://api.github.com/users/alunny/gists{/gist_id}","starred_url":"https://api.github.com/users/alunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alunny/subscriptions","organizations_url":"https://api.github.com/users/alunny/orgs","repos_url":"https://api.github.com/users/alunny/repos","events_url":"https://api.github.com/users/alunny/events{/privacy}","received_events_url":"https://api.github.com/users/alunny/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T19:15:35Z","updated_at":"2016-03-30T19:15:35Z","body":"I have a smaller (still 130K) repro that may of use to the webkit folk:\r\nhttps://gist.github.com/alunny/5a42d0e667fbf5fc498566db4d9a7ea5\r\n\r\nThat removes all of the async code, so you can run it with `jsc` and repro the issue (and also run with `node` to see the expected behavior).\r\n\r\nI'll be out most of this afternoon, but will be back in the evening to hammer on it some more."}}