{"action":"created","issue":{"url":"https://api.github.com/repos/FormidableLabs/radium/issues/58","labels_url":"https://api.github.com/repos/FormidableLabs/radium/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/FormidableLabs/radium/issues/58/comments","events_url":"https://api.github.com/repos/FormidableLabs/radium/issues/58/events","html_url":"https://github.com/FormidableLabs/radium/issues/58","id":59363498,"number":58,"title":"Performance concerns","user":{"login":"iclanzan","id":1806943,"avatar_url":"https://avatars.githubusercontent.com/u/1806943?v=3","gravatar_id":"","url":"https://api.github.com/users/iclanzan","html_url":"https://github.com/iclanzan","followers_url":"https://api.github.com/users/iclanzan/followers","following_url":"https://api.github.com/users/iclanzan/following{/other_user}","gists_url":"https://api.github.com/users/iclanzan/gists{/gist_id}","starred_url":"https://api.github.com/users/iclanzan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iclanzan/subscriptions","organizations_url":"https://api.github.com/users/iclanzan/orgs","repos_url":"https://api.github.com/users/iclanzan/repos","events_url":"https://api.github.com/users/iclanzan/events{/privacy}","received_events_url":"https://api.github.com/users/iclanzan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FormidableLabs/radium/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-28T22:49:48Z","updated_at":"2015-03-01T01:53:16Z","closed_at":null,"body":"Computing styles can be quite expensive with all the merging and mapping of objects and is made worse by the fact that they are recomputed on every render, even if they don’t change.\r\n\r\nAny thoughts on how the situation can be improved?"},"comment":{"url":"https://api.github.com/repos/FormidableLabs/radium/issues/comments/76563417","html_url":"https://github.com/FormidableLabs/radium/issues/58#issuecomment-76563417","issue_url":"https://api.github.com/repos/FormidableLabs/radium/issues/58","id":76563417,"user":{"login":"alexlande","id":808159,"avatar_url":"https://avatars.githubusercontent.com/u/808159?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlande","html_url":"https://github.com/alexlande","followers_url":"https://api.github.com/users/alexlande/followers","following_url":"https://api.github.com/users/alexlande/following{/other_user}","gists_url":"https://api.github.com/users/alexlande/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlande/subscriptions","organizations_url":"https://api.github.com/users/alexlande/orgs","repos_url":"https://api.github.com/users/alexlande/repos","events_url":"https://api.github.com/users/alexlande/events{/privacy}","received_events_url":"https://api.github.com/users/alexlande/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T01:53:16Z","updated_at":"2015-03-01T01:53:16Z","body":"Warning: I don't have perfect answers for you on this one. :)\r\n\r\nThere are a few issues I think:\r\n\r\n1. Yeah, computing styles can be expensive, particularly if you're using all of Radium's features together. We haven't seen any particular performance bottlenecks here yet in our own apps, but it is something to be aware of and that we're keeping an eye on.\r\n2. I think there's ample room in `style-resolver.js` for optimization, which should help some. Any help there would be appreciated.\r\n3. Sounds like you're suggesting caching resolved styles or some sort of check before re-calculating styles. I'm not sure how that would work exactly, but it does sound like an interesting direction. If you have any ideas please let me know, would love to talk about it.\r\n4. On the plus side, the resulting styles are diffed and selectively applied to the DOM, so the only potential bottleneck is the actual resolution of the style object."}}