{"action":"created","issue":{"url":"https://api.github.com/repos/ngReact/ngReact/issues/129","repository_url":"https://api.github.com/repos/ngReact/ngReact","labels_url":"https://api.github.com/repos/ngReact/ngReact/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/ngReact/ngReact/issues/129/comments","events_url":"https://api.github.com/repos/ngReact/ngReact/issues/129/events","html_url":"https://github.com/ngReact/ngReact/issues/129","id":124105809,"number":129,"title":"Function in props always wrapped in $appy()","user":{"login":"artaommahe","id":1944061,"avatar_url":"https://avatars.githubusercontent.com/u/1944061?v=3","gravatar_id":"","url":"https://api.github.com/users/artaommahe","html_url":"https://github.com/artaommahe","followers_url":"https://api.github.com/users/artaommahe/followers","following_url":"https://api.github.com/users/artaommahe/following{/other_user}","gists_url":"https://api.github.com/users/artaommahe/gists{/gist_id}","starred_url":"https://api.github.com/users/artaommahe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artaommahe/subscriptions","organizations_url":"https://api.github.com/users/artaommahe/orgs","repos_url":"https://api.github.com/users/artaommahe/repos","events_url":"https://api.github.com/users/artaommahe/events{/privacy}","received_events_url":"https://api.github.com/users/artaommahe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-28T18:41:24Z","updated_at":"2016-02-09T19:15:00Z","closed_at":null,"body":"https://github.com/ngReact/ngReact/blob/master/ngReact.js#L158\r\nhttps://github.com/ngReact/ngReact/blob/master/ngReact.js#L60\r\n\r\nAny function passed to component props wrapped with $scope.$apply. So on each props.func() call we will triger digest cycle even if it's simple function that does not change any digest value. It is huge performance drop. Maybe add directive option that will skip $scope.$apply() wrapper for props functions?\r\n\r\ne.x. from current app, react items list with ~250 items(images with text)\r\nwith props function call - http://i.imgur.com/vN5zZHu.png (1.48 s)\r\nwithout - http://i.imgur.com/Q4G0ISr.png (298.41 ms)"},"comment":{"url":"https://api.github.com/repos/ngReact/ngReact/issues/comments/182013475","html_url":"https://github.com/ngReact/ngReact/issues/129#issuecomment-182013475","issue_url":"https://api.github.com/repos/ngReact/ngReact/issues/129","id":182013475,"user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T19:15:00Z","updated_at":"2016-02-09T19:15:00Z","body":"This isn't a perfect solution, but I've gotten around it the issue by wrapping non-\"action\" type methods in a \"helpers\" object so they won't get wrapped.\r\n\r\nPerhaps it would make sense to expose an `actions` argument to the `react-component` directive that would wrap functions passed in. Functions in `props` would no longer be wrapped, and `actions` wouldn't be watched... "}}