{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-dotnet/issues/857","repository_url":"https://api.github.com/repos/realm/realm-dotnet","labels_url":"https://api.github.com/repos/realm/realm-dotnet/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/issues/857/comments","events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/857/events","html_url":"https://github.com/realm/realm-dotnet/pull/857","id":181409680,"number":857,"title":"Speed-up calls to Realm.Manage","user":{"login":"nirinchev","id":2315687,"avatar_url":"https://avatars.githubusercontent.com/u/2315687?v=3","gravatar_id":"","url":"https://api.github.com/users/nirinchev","html_url":"https://github.com/nirinchev","followers_url":"https://api.github.com/users/nirinchev/followers","following_url":"https://api.github.com/users/nirinchev/following{/other_user}","gists_url":"https://api.github.com/users/nirinchev/gists{/gist_id}","starred_url":"https://api.github.com/users/nirinchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirinchev/subscriptions","organizations_url":"https://api.github.com/users/nirinchev/orgs","repos_url":"https://api.github.com/users/nirinchev/repos","events_url":"https://api.github.com/users/nirinchev/events{/privacy}","received_events_url":"https://api.github.com/users/nirinchev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-dotnet/labels/S:Review","name":"S:Review","color":"ededed"},{"url":"https://api.github.com/repos/realm/realm-dotnet/labels/T:Enhancement","name":"T:Enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"nirinchev","id":2315687,"avatar_url":"https://avatars.githubusercontent.com/u/2315687?v=3","gravatar_id":"","url":"https://api.github.com/users/nirinchev","html_url":"https://github.com/nirinchev","followers_url":"https://api.github.com/users/nirinchev/followers","following_url":"https://api.github.com/users/nirinchev/following{/other_user}","gists_url":"https://api.github.com/users/nirinchev/gists{/gist_id}","starred_url":"https://api.github.com/users/nirinchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirinchev/subscriptions","organizations_url":"https://api.github.com/users/nirinchev/orgs","repos_url":"https://api.github.com/users/nirinchev/repos","events_url":"https://api.github.com/users/nirinchev/events{/privacy}","received_events_url":"https://api.github.com/users/nirinchev/received_events","type":"User","site_admin":false},"assignees":[{"login":"fealebenpae","id":289915,"avatar_url":"https://avatars.githubusercontent.com/u/289915?v=3","gravatar_id":"","url":"https://api.github.com/users/fealebenpae","html_url":"https://github.com/fealebenpae","followers_url":"https://api.github.com/users/fealebenpae/followers","following_url":"https://api.github.com/users/fealebenpae/following{/other_user}","gists_url":"https://api.github.com/users/fealebenpae/gists{/gist_id}","starred_url":"https://api.github.com/users/fealebenpae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fealebenpae/subscriptions","organizations_url":"https://api.github.com/users/fealebenpae/orgs","repos_url":"https://api.github.com/users/fealebenpae/repos","events_url":"https://api.github.com/users/fealebenpae/events{/privacy}","received_events_url":"https://api.github.com/users/fealebenpae/received_events","type":"User","site_admin":false},{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},{"login":"nirinchev","id":2315687,"avatar_url":"https://avatars.githubusercontent.com/u/2315687?v=3","gravatar_id":"","url":"https://api.github.com/users/nirinchev","html_url":"https://github.com/nirinchev","followers_url":"https://api.github.com/users/nirinchev/followers","following_url":"https://api.github.com/users/nirinchev/following{/other_user}","gists_url":"https://api.github.com/users/nirinchev/gists{/gist_id}","starred_url":"https://api.github.com/users/nirinchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nirinchev/subscriptions","organizations_url":"https://api.github.com/users/nirinchev/orgs","repos_url":"https://api.github.com/users/nirinchev/repos","events_url":"https://api.github.com/users/nirinchev/events{/privacy}","received_events_url":"https://api.github.com/users/nirinchev/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/realm/realm-dotnet/milestones/2","html_url":"https://github.com/realm/realm-dotnet/milestones/v1.0","labels_url":"https://api.github.com/repos/realm/realm-dotnet/milestones/2/labels","id":1863258,"number":2,"title":"v1.0","description":"","creator":{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":55,"state":"open","created_at":"2016-07-04T13:42:16Z","updated_at":"2016-10-07T14:09:29Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-10-06T13:06:37Z","updated_at":"2016-10-07T16:31:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/realm/realm-dotnet/pulls/857","html_url":"https://github.com/realm/realm-dotnet/pull/857","diff_url":"https://github.com/realm/realm-dotnet/pull/857.diff","patch_url":"https://github.com/realm/realm-dotnet/pull/857.patch"},"body":"This is a change that aims two things\r\n1) Bring the performance of `Realm.Manage` closer to `Realm.CreateObject`\r\n2) Pave the way for `AddOrUpdate` (#808)\r\n\r\nThe essence here is weaving `CopyToRealm` in `IRealmObjectHelper` implementors that replaces the reflection that we used before. Here's the performance comparison\r\n\r\n|         | CreateObject | Manage (woven) | Manage (reflection) |\r\n|---------|--------------|----------------|---------------------|\r\n| Sparse  | 1235         | ~~2931~~ 1523      | 11291               |\r\n| Dense | 827          | 951            | 2527                |\r\n\r\nTimes are in `ms` and the test was performed with `100000` objects.\r\n`Sparse` refers to objects with a lot of properties, where only a few are set.\r\n`Dense` refers to objects where all properties are set.\r\n\r\nThe current implementation guards against hitting ObjectStore by doing\r\n```csharp\r\nif (field != default(fieldType))\r\n{\r\n    Property = field\r\n}\r\n```\r\n\r\n**only for** value types, objects, and lists. It doesn't support nullable value types because the IL is getting out of hand as is and didn't seem like it would add a lot of value."},"comment":{"url":"https://api.github.com/repos/realm/realm-dotnet/issues/comments/252299106","html_url":"https://github.com/realm/realm-dotnet/pull/857#issuecomment-252299106","issue_url":"https://api.github.com/repos/realm/realm-dotnet/issues/857","id":252299106,"user":{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T16:31:44Z","updated_at":"2016-10-07T16:31:44Z","body":":+1: from me as well. Very nice work!"}}
{"actor":{"display_login":"kristiandupont"}}