{"action":"created","issue":{"url":"https://api.github.com/repos/GitbookIO/slate/issues/6","repository_url":"https://api.github.com/repos/GitbookIO/slate","labels_url":"https://api.github.com/repos/GitbookIO/slate/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/GitbookIO/slate/issues/6/comments","events_url":"https://api.github.com/repos/GitbookIO/slate/issues/6/events","html_url":"https://github.com/GitbookIO/slate/pull/6","id":189067828,"number":6,"title":"Experiment with pure memoization for the Schema","user":{"login":"Soreine","id":5644953,"avatar_url":"https://avatars.githubusercontent.com/u/5644953?v=3","gravatar_id":"","url":"https://api.github.com/users/Soreine","html_url":"https://github.com/Soreine","followers_url":"https://api.github.com/users/Soreine/followers","following_url":"https://api.github.com/users/Soreine/following{/other_user}","gists_url":"https://api.github.com/users/Soreine/gists{/gist_id}","starred_url":"https://api.github.com/users/Soreine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soreine/subscriptions","organizations_url":"https://api.github.com/users/Soreine/orgs","repos_url":"https://api.github.com/users/Soreine/repos","events_url":"https://api.github.com/users/Soreine/events{/privacy}","received_events_url":"https://api.github.com/users/Soreine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-14T09:45:02Z","updated_at":"2016-11-15T11:19:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GitbookIO/slate/pulls/6","html_url":"https://github.com/GitbookIO/slate/pull/6","diff_url":"https://github.com/GitbookIO/slate/pull/6.diff","patch_url":"https://github.com/GitbookIO/slate/pull/6.patch"},"body":"\r\nFrom a comment on the original PR\r\n\r\n> @Soreine\r\n> Memoizing has some overhead. And we opted to compare with the previous document during normalization, for performance. We assume that the state at the beginning of every transform is already normalized. From this assumption, we avoid calling the validation on nodes that have not changed. We could make a branch where we go for the pure memoization path instead, and compare the result. I can volunteer if you think this would be better.\r\n\r\n\r\n> @ianstormtaylor\r\n> I'd be interested in what the pure memoization path yields in terms of performance. How much work would that take do you think to benchmark?\r\n> \r\n> It sounds like the \"previous document\" approach currently works, but it makes some assumptions that add complexity. For example, if you were to try to normalize with your own custom schema, there's not guarantee that the previous document adhered to it when you do, so that seems like it might cause issues? My guess is there are other similar problems that might crop up. Ideally we could be fully stateless in that regard, so that we don't end up with strange edge cases.\r\n> "},"comment":{"url":"https://api.github.com/repos/GitbookIO/slate/issues/comments/260615686","html_url":"https://github.com/GitbookIO/slate/pull/6#issuecomment-260615686","issue_url":"https://api.github.com/repos/GitbookIO/slate/issues/6","id":260615686,"user":{"login":"Soreine","id":5644953,"avatar_url":"https://avatars.githubusercontent.com/u/5644953?v=3","gravatar_id":"","url":"https://api.github.com/users/Soreine","html_url":"https://github.com/Soreine","followers_url":"https://api.github.com/users/Soreine/followers","following_url":"https://api.github.com/users/Soreine/following{/other_user}","gists_url":"https://api.github.com/users/Soreine/gists{/gist_id}","starred_url":"https://api.github.com/users/Soreine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soreine/subscriptions","organizations_url":"https://api.github.com/users/Soreine/orgs","repos_url":"https://api.github.com/users/Soreine/repos","events_url":"https://api.github.com/users/Soreine/events{/privacy}","received_events_url":"https://api.github.com/users/Soreine/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T11:19:35Z","updated_at":"2016-11-15T11:19:35Z","body":"1. I made it bigger and deeper (4*4*4*3 nodes). The results are close once again. I don't think that depth is a real-world factor. \r\n\r\n2. Currently, the normalization logic is bottom-up. So I wonder how :) \r\n\r\nWhat do you think if we go for the memoization path ?\r\n\r\n"}}
{"actor":{"display_login":"Soreine"}}