{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-js/issues/2499","repository_url":"https://api.github.com/repos/realm/realm-js","labels_url":"https://api.github.com/repos/realm/realm-js/issues/2499/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-js/issues/2499/comments","events_url":"https://api.github.com/repos/realm/realm-js/issues/2499/events","html_url":"https://github.com/realm/realm-js/issues/2499","id":485652851,"node_id":"MDU6SXNzdWU0ODU2NTI4NTE=","number":2499,"title":"Performance Problems when working with large datasets","user":{"login":"thekevinbrown","id":1531750,"node_id":"MDQ6VXNlcjE1MzE3NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1531750?v=4","gravatar_id":"","url":"https://api.github.com/users/thekevinbrown","html_url":"https://github.com/thekevinbrown","followers_url":"https://api.github.com/users/thekevinbrown/followers","following_url":"https://api.github.com/users/thekevinbrown/following{/other_user}","gists_url":"https://api.github.com/users/thekevinbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/thekevinbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thekevinbrown/subscriptions","organizations_url":"https://api.github.com/users/thekevinbrown/orgs","repos_url":"https://api.github.com/users/thekevinbrown/repos","events_url":"https://api.github.com/users/thekevinbrown/events{/privacy}","received_events_url":"https://api.github.com/users/thekevinbrown/received_events","type":"User","site_admin":false},"labels":[{"id":643640187,"node_id":"MDU6TGFiZWw2NDM2NDAxODc=","url":"https://api.github.com/repos/realm/realm-js/labels/O-Community","name":"O-Community","color":"006b75","default":false},{"id":247475514,"node_id":"MDU6TGFiZWwyNDc0NzU1MTQ=","url":"https://api.github.com/repos/realm/realm-js/labels/T-Help","name":"T-Help","color":"cc317c","default":false}],"state":"closed","locked":false,"assignee":{"login":"kneth","id":1225363,"node_id":"MDQ6VXNlcjEyMjUzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1225363?v=4","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false},"assignees":[{"login":"kneth","id":1225363,"node_id":"MDQ6VXNlcjEyMjUzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1225363?v=4","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2019-08-27T08:07:37Z","updated_at":"2019-10-01T11:40:24Z","closed_at":"2019-09-30T04:02:51Z","author_association":"NONE","body":"## Goals\r\n\r\nOur app allows users to sort the photos on their device in a unique way. This means they can't just use the built in photos app to do the sorting.\r\n\r\nAs a result we have Photos and Albums. We store a URI to the photo and what albums the photo has been sorted to.\r\n\r\n## Expected Results\r\n\r\nWriting 50 records should take less than a second.\r\n\r\n## Actual Results\r\n\r\nIf there are more than 5,000 records in the database, adding 50 more takes ~1 second. Since this is react native this absolutely kills the responsiveness of the app.\r\n\r\nNOTE: This is definitely a release build, Android.\r\n\r\n## Steps to Reproduce\r\n\r\nI'll create a repro if necessary, just want to make sure this isn't expected behaviour before I do.\r\n\r\n## Code Sample\r\n\r\n```\r\nexport class Photo {\r\n\tstatic schema: ObjectSchema = {\r\n\t\tname: 'Photo',\r\n\t\tprimaryKey: 'uri',\r\n\t\tproperties: {\r\n\t\t\ttimestamp: { type: 'date', indexed: true },\r\n\t\t\turi: 'string',\r\n\t\t\twidth: 'double',\r\n\t\t\theight: 'double',\r\n\t\t\talbums: 'Album[]',\r\n\t\t\tinTrash: { type: 'bool', default: false, indexed: true },\r\n\t\t\tlastSeenImportId: { type: 'string?', indexed: true },\r\n\t\t},\r\n\t};\r\n\r\n\t// ...\r\n}\r\n\r\nexport class Album {\r\n\tstatic schema: ObjectSchema = {\r\n\t\tname: 'Album',\r\n\t\tprimaryKey: 'id',\r\n\t\tproperties: {\r\n\t\t\tid: 'string',\r\n\t\t\tname: 'string',\r\n\t\t\tphotos: { type: 'linkingObjects', objectType: 'Photo', property: 'albums' },\r\n\t\t},\r\n\t};\r\n\r\n\t// ...\r\n}\r\n```\r\n\r\n## Version of Realm and Tooling\r\n\r\n- Realm JS SDK Version: 2.29.2\r\n- React Native: 0.59.10\r\n- Client OS & Version: Android, all tested versions.\r\n- Which debugger for React Native: None, Release build with console.log profiling.\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-js/issues/comments/536997080","html_url":"https://github.com/realm/realm-js/issues/2499#issuecomment-536997080","issue_url":"https://api.github.com/repos/realm/realm-js/issues/2499","id":536997080,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNjk5NzA4MA==","user":{"login":"kneth","id":1225363,"node_id":"MDQ6VXNlcjEyMjUzNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/1225363?v=4","gravatar_id":"","url":"https://api.github.com/users/kneth","html_url":"https://github.com/kneth","followers_url":"https://api.github.com/users/kneth/followers","following_url":"https://api.github.com/users/kneth/following{/other_user}","gists_url":"https://api.github.com/users/kneth/gists{/gist_id}","starred_url":"https://api.github.com/users/kneth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneth/subscriptions","organizations_url":"https://api.github.com/users/kneth/orgs","repos_url":"https://api.github.com/users/kneth/repos","events_url":"https://api.github.com/users/kneth/events{/privacy}","received_events_url":"https://api.github.com/users/kneth/received_events","type":"User","site_admin":false},"created_at":"2019-10-01T11:40:24Z","updated_at":"2019-10-01T11:40:24Z","author_association":"CONTRIBUTOR","body":"@thekevinbrown Thanks for splitting into multiple issues. I hope that I can return to them shortly."}}
{"actor":{"display_login":"kneth"}}