{"action":"closed","issue":{"url":"https://api.github.com/repos/chenglou/react-tween-state/issues/42","labels_url":"https://api.github.com/repos/chenglou/react-tween-state/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/chenglou/react-tween-state/issues/42/comments","events_url":"https://api.github.com/repos/chenglou/react-tween-state/issues/42/events","html_url":"https://github.com/chenglou/react-tween-state/issues/42","id":93503969,"number":42,"title":"Performance issue during Tween Animation","user":{"login":"hlissnake","id":859360,"avatar_url":"https://avatars.githubusercontent.com/u/859360?v=3","gravatar_id":"","url":"https://api.github.com/users/hlissnake","html_url":"https://github.com/hlissnake","followers_url":"https://api.github.com/users/hlissnake/followers","following_url":"https://api.github.com/users/hlissnake/following{/other_user}","gists_url":"https://api.github.com/users/hlissnake/gists{/gist_id}","starred_url":"https://api.github.com/users/hlissnake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlissnake/subscriptions","organizations_url":"https://api.github.com/users/hlissnake/orgs","repos_url":"https://api.github.com/users/hlissnake/repos","events_url":"https://api.github.com/users/hlissnake/events{/privacy}","received_events_url":"https://api.github.com/users/hlissnake/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-07T10:57:08Z","updated_at":"2015-07-27T05:57:49Z","closed_at":"2015-07-27T05:57:49Z","body":"I found that in some cases, if I place lots of dom element in my page. Animation via tweenState can lead to performance problem. There are no obvious latency in page interaction, but it's hard to reach 50fps in iPhone4S or even iPhone5.\r\n\r\nI suppose that every time when you execute setState in React, it will trigger the Diff process to create new ReactElement instance. If you have complex dom structure you need to generate big amount of ReactElements per frame!\r\n\r\nI think it might cost a lot to achieve animation via setState per frame. I purpose than it is better to get the ref of the animation target ReactElement, and operate dom style directly. I know that it is not a matter of React Diff by doing so. Despite I still consider this can be the best method to achieve high performance Animation in React. I also achieve anims in my React webapp by using operate Domstyle directly.\r\n\r\nThank you"}}