{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/548","repository_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS","labels_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/548/comments","events_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/548/events","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/548","id":371680594,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MDc0NjAw","number":548,"title":"Improve FirestoreUI performance","user":{"login":"morganchen12","id":4529021,"node_id":"MDQ6VXNlcjQ1MjkwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4529021?v=4","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"morganchen12","id":4529021,"node_id":"MDQ6VXNlcjQ1MjkwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4529021?v=4","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"assignees":[{"login":"morganchen12","id":4529021,"node_id":"MDQ6VXNlcjQ1MjkwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4529021?v=4","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-18T19:38:00Z","updated_at":"2018-10-24T19:56:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/548","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/548","diff_url":"https://github.com/firebase/FirebaseUI-iOS/pull/548.diff","patch_url":"https://github.com/firebase/FirebaseUI-iOS/pull/548.patch"},"body":"Improves performance for diff update after changing query on `FUIBatchedArray`. The diff generated from the new algorithm ay not be entirely minimal, but should always be correct (and doesn't generate egregious amounts of unneeded updates)."},"comment":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/comments/432805805","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/548#issuecomment-432805805","issue_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/548","id":432805805,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjgwNTgwNQ==","user":{"login":"morganchen12","id":4529021,"node_id":"MDQ6VXNlcjQ1MjkwMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/4529021?v=4","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T19:56:29Z","updated_at":"2018-10-24T19:56:29Z","author_association":"CONTRIBUTOR","body":">Also, out of curiosity, how slow was the old implementation? Were there noticeable hiccups? How\r\nmany items did you need for it to become noticeable? It seems like there's a spectrum of diffing tradeoffs that goes from \"full LCS minimal diff\" on one end to \"just trigger removes for all the old items followed by adds for all the new items\" on the other end, and I'm wondering a little bit where we should be aiming.\r\n\r\nThe old implementation bogged down at around 150 elements. You're right in that the new implementation is no longer a minimal diff (which you can see reflected in the changes to the unit tests). The more complex our diff is, the more expensive the UIKit calls will be since UIKit will have to do more updates to end up with the same result state. This change brings us from quadratic performance `m * n` to linear `m + n`, and scales to the point where UIKit is the bottleneck, and not the diffing logic.\r\n\r\n"}}
{"actor":{"display_login":"morganchen12"}}