{"action":"created","issue":{"url":"https://api.github.com/repos/omniscientjs/immstruct/issues/56","labels_url":"https://api.github.com/repos/omniscientjs/immstruct/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/omniscientjs/immstruct/issues/56/comments","events_url":"https://api.github.com/repos/omniscientjs/immstruct/issues/56/events","html_url":"https://github.com/omniscientjs/immstruct/pull/56","id":67269806,"number":56,"title":"listListenerMatching optimization","user":{"login":"andrewluetgers","id":232036,"avatar_url":"https://avatars.githubusercontent.com/u/232036?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewluetgers","html_url":"https://github.com/andrewluetgers","followers_url":"https://api.github.com/users/andrewluetgers/followers","following_url":"https://api.github.com/users/andrewluetgers/following{/other_user}","gists_url":"https://api.github.com/users/andrewluetgers/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewluetgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewluetgers/subscriptions","organizations_url":"https://api.github.com/users/andrewluetgers/orgs","repos_url":"https://api.github.com/users/andrewluetgers/repos","events_url":"https://api.github.com/users/andrewluetgers/events{/privacy}","received_events_url":"https://api.github.com/users/andrewluetgers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-09T03:07:55Z","updated_at":"2015-04-11T12:57:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/omniscientjs/immstruct/pulls/56","html_url":"https://github.com/omniscientjs/immstruct/pull/56","diff_url":"https://github.com/omniscientjs/immstruct/pull/56.diff","patch_url":"https://github.com/omniscientjs/immstruct/pull/56.patch"},"body":"I closed a prior PR because it was hopelessly messy. Hopefully this will make it easier to evaluate this change.\r\n\r\n## listListenerMatching optimization\r\nThis optimization was the result of experimenting with a custom omniscient mixin that allows you to do reference observer based updating of components directly as opposed to the usual top down approach. https://github.com/omniscientjs/omniscient/issues/93#issuecomment-84812169\r\nI was able to achieve 80 fps using what would be the normal approach with immstruct, with the omniscient mixin I was able to get 100 fps and with this change to the underlying datastructure used by listListenerMatching I was able to achieve 170 fps. As a reference the fastest this app can operate on my machine is at 200 fps using vanilla js. See the above link for running code samples.\r\n\r\nCurrently the only test that is failing is 'should allow values as key paths.' This implementation expects to be able to turn keyPaths into keys in a plain JS object for the tree of observers so may be incompatible with values as key paths if those \"values\" cannot be easily turned into a string."},"comment":{"url":"https://api.github.com/repos/omniscientjs/immstruct/issues/comments/91838617","html_url":"https://github.com/omniscientjs/immstruct/pull/56#issuecomment-91838617","issue_url":"https://api.github.com/repos/omniscientjs/immstruct/issues/56","id":91838617,"user":{"login":"andrewluetgers","id":232036,"avatar_url":"https://avatars.githubusercontent.com/u/232036?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewluetgers","html_url":"https://github.com/andrewluetgers","followers_url":"https://api.github.com/users/andrewluetgers/followers","following_url":"https://api.github.com/users/andrewluetgers/following{/other_user}","gists_url":"https://api.github.com/users/andrewluetgers/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewluetgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewluetgers/subscriptions","organizations_url":"https://api.github.com/users/andrewluetgers/orgs","repos_url":"https://api.github.com/users/andrewluetgers/repos","events_url":"https://api.github.com/users/andrewluetgers/events{/privacy}","received_events_url":"https://api.github.com/users/andrewluetgers/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T12:57:24Z","updated_at":"2015-04-11T12:57:24Z","body":"Fair enough, any suggestions on how to make the code easier to follow? Also what are the areas of mutation and side-effect that are of concern?"}}