{"action":"opened","issue":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/405","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/405/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/405/comments","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/405/events","html_url":"https://github.com/couchbase/couchbase-lite-net/issues/405","id":70578731,"number":405,"title":"Add in replication optimization from iOS version","user":{"login":"borrrden","id":2470288,"avatar_url":"https://avatars.githubusercontent.com/u/2470288?v=3","gravatar_id":"","url":"https://api.github.com/users/borrrden","html_url":"https://github.com/borrrden","followers_url":"https://api.github.com/users/borrrden/followers","following_url":"https://api.github.com/users/borrrden/following{/other_user}","gists_url":"https://api.github.com/users/borrrden/gists{/gist_id}","starred_url":"https://api.github.com/users/borrrden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borrrden/subscriptions","organizations_url":"https://api.github.com/users/borrrden/orgs","repos_url":"https://api.github.com/users/borrrden/repos","events_url":"https://api.github.com/users/borrrden/events{/privacy}","received_events_url":"https://api.github.com/users/borrrden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-24T03:56:27Z","updated_at":"2015-04-24T03:56:27Z","closed_at":null,"body":"See also https://github.com/couchbase/couchbase-lite-java-core/issues/590\r\n\r\nIt’d be nice to add https://github.com/couchbase/couchbase-lite-ios/commit/5b98b28308bc9b3f3d1f07adda34accb1de0dbc0, which I just pushed to master, to the CBL/iOS 1.1 release branch. It’s a pretty big performance improvement for pulling documents with long revision histories. I found the problem when trying to figure out why pulling the Sightplan database took so long. Before the fix it takes 55 seconds even from a local server, and after the fix it’s only about 7 seconds.\r\n\r\n—Jens\r\n\r\nPS: It’d probably be pretty easy to make the same change in Java and C#. It mostly consists of creating a dictionary/map to look up revisions instead of going through an O(n) RevisionList, when inserting an existing revision."}}