{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1","id":51460998,"html_url":"https://github.com/keima/MostPowerfulOrmInAndroid/pull/1","diff_url":"https://github.com/keima/MostPowerfulOrmInAndroid/pull/1.diff","patch_url":"https://github.com/keima/MostPowerfulOrmInAndroid/pull/1.patch","issue_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/1","number":1,"state":"closed","locked":false,"title":"Test suite for Orma (v0.6.0)","user":{"login":"gfx","id":101800,"avatar_url":"https://avatars.githubusercontent.com/u/101800?v=3","gravatar_id":"","url":"https://api.github.com/users/gfx","html_url":"https://github.com/gfx","followers_url":"https://api.github.com/users/gfx/followers","following_url":"https://api.github.com/users/gfx/following{/other_user}","gists_url":"https://api.github.com/users/gfx/gists{/gist_id}","starred_url":"https://api.github.com/users/gfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfx/subscriptions","organizations_url":"https://api.github.com/users/gfx/orgs","repos_url":"https://api.github.com/users/gfx/repos","events_url":"https://api.github.com/users/gfx/events{/privacy}","received_events_url":"https://api.github.com/users/gfx/received_events","type":"User","site_admin":false},"body":"[Orma](https://github.com/gfx/Android-Orma) を追加しました。\r\n\r\nOrmaTest.java が妥当かどうかご確認ください。\r\n\r\nなお手元のNexus 9 (Marshmallow) で2回実行すると↓のようになりました。\r\n\r\n```shell\r\nadb logcat -t 1000 | ag OrmaTest: | perl -p -E 's/^.*OrmaTest: //'\r\n```\r\n\r\n```\r\nInsert on ORMA (BulkMode:ON): begin\r\nInsert on ORMA (BulkMode:ON):      270 ms, Insert 10000 records.\r\nInsert on ORMA (BulkMode:ON):      48 ms, Select Records.\r\nInsert on ORMA (BulkMode:ON): end, 318 ms\r\nInsert on ORMA (BulkMode:OFF): begin\r\nInsert on ORMA (BulkMode:OFF):      8440 ms, Insert 10000 records.\r\nInsert on ORMA (BulkMode:OFF):      42 ms, Select Records.\r\nInsert on ORMA (BulkMode:OFF): end, 8482 ms\r\nInsert on ORMA (BulkMode:ON): begin\r\nInsert on ORMA (BulkMode:ON):      255 ms, Insert 10000 records.\r\nInsert on ORMA (BulkMode:ON):      42 ms, Select Records.\r\nInsert on ORMA (BulkMode:ON): end, 297 ms\r\nInsert on ORMA (BulkMode:OFF): begin\r\nInsert on ORMA (BulkMode:OFF):      11062 ms, Insert 10000 records.\r\nInsert on ORMA (BulkMode:OFF):      40 ms, Select Records.\r\nInsert on ORMA (BulkMode:OFF): end, 11102 ms\r\n```\r\n\r\n同じ端末でのRealm (v0.84.2)の結果は↓です。\r\n\r\n```shell\r\nadb logcat -t 1000 | ag RealmTest: | perl -p -E 's/^.*RealmTest: //'\r\n```\r\n\r\n```\r\nInsert on REALM (BulkMode:ON): begin\r\nInsert on REALM (BulkMode:ON):      346 ms, Insert 10000 records.\r\nInsert on REALM (BulkMode:ON):      4 ms, Select Records.\r\nInsert on REALM (BulkMode:ON):      38 ms, Manual Import!: Select Records.\r\nInsert on REALM (BulkMode:ON): end, 388 ms\r\nInsert on REALM (BulkMode:OFF): begin\r\nInsert on REALM (BulkMode:OFF):      56026 ms, Insert 10000 records.\r\nInsert on REALM (BulkMode:OFF):      3 ms, Select Records.\r\nInsert on REALM (BulkMode:OFF):      30 ms, Manual Import!: Select Records.\r\nInsert on REALM (BulkMode:OFF): end, 56059 ms\r\nInsert on REALM (BulkMode:ON): begin\r\nInsert on REALM (BulkMode:ON):      318 ms, Insert 10000 records.\r\nInsert on REALM (BulkMode:ON):      2 ms, Select Records.\r\nInsert on REALM (BulkMode:ON):      31 ms, Manual Import!: Select Records.\r\nInsert on REALM (BulkMode:ON): end, 351 ms\r\nInsert on REALM (BulkMode:OFF): begin\r\nInsert on REALM (BulkMode:OFF):      57327 ms, Insert 10000 records.\r\nInsert on REALM (BulkMode:OFF):      1 ms, Select Records.\r\nInsert on REALM (BulkMode:OFF):      27 ms, Manual Import!: Select Records.\r\nInsert on REALM (BulkMode:OFF): end, 57355 ms\r\n```\r\n\r\nところで、Realmは `findAll() -> RealmResults<T>` を行った時点ではクエリを発行しないようです。RealmResultsから値を取り出そうとして初めてクエリを発行するようですね。なので、manual importまでしてはじめて等価のオペレーションといってよさそうです。\r\n\r\nRealmが爆速といわれるのは案外ベンチマークコードの間違いで、現状（v0.8x）だと最適化されたSQLiteベースのORMと実は大差ないという可能性がありますね。","created_at":"2015-11-22T09:15:02Z","updated_at":"2015-11-24T05:35:24Z","closed_at":"2015-11-24T05:35:24Z","merged_at":"2015-11-24T05:35:24Z","merge_commit_sha":"01e3d24b5af280d39290a3b8e28e3e33cceb28d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1/commits","review_comments_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1/comments","review_comment_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/1/comments","statuses_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/statuses/8db7ae908f7388182d707cd4c29d2857651f1a8e","head":{"label":"gfx:orma","ref":"orma","sha":"8db7ae908f7388182d707cd4c29d2857651f1a8e","user":{"login":"gfx","id":101800,"avatar_url":"https://avatars.githubusercontent.com/u/101800?v=3","gravatar_id":"","url":"https://api.github.com/users/gfx","html_url":"https://github.com/gfx","followers_url":"https://api.github.com/users/gfx/followers","following_url":"https://api.github.com/users/gfx/following{/other_user}","gists_url":"https://api.github.com/users/gfx/gists{/gist_id}","starred_url":"https://api.github.com/users/gfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfx/subscriptions","organizations_url":"https://api.github.com/users/gfx/orgs","repos_url":"https://api.github.com/users/gfx/repos","events_url":"https://api.github.com/users/gfx/events{/privacy}","received_events_url":"https://api.github.com/users/gfx/received_events","type":"User","site_admin":false},"repo":{"id":46653025,"name":"MostPowerfulOrmInAndroid","full_name":"gfx/MostPowerfulOrmInAndroid","owner":{"login":"gfx","id":101800,"avatar_url":"https://avatars.githubusercontent.com/u/101800?v=3","gravatar_id":"","url":"https://api.github.com/users/gfx","html_url":"https://github.com/gfx","followers_url":"https://api.github.com/users/gfx/followers","following_url":"https://api.github.com/users/gfx/following{/other_user}","gists_url":"https://api.github.com/users/gfx/gists{/gist_id}","starred_url":"https://api.github.com/users/gfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfx/subscriptions","organizations_url":"https://api.github.com/users/gfx/orgs","repos_url":"https://api.github.com/users/gfx/repos","events_url":"https://api.github.com/users/gfx/events{/privacy}","received_events_url":"https://api.github.com/users/gfx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gfx/MostPowerfulOrmInAndroid","description":null,"fork":true,"url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid","forks_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/forks","keys_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/teams","hooks_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/hooks","issue_events_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/issues/events{/number}","events_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/events","assignees_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/assignees{/user}","branches_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/branches{/branch}","tags_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/tags","blobs_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/statuses/{sha}","languages_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/languages","stargazers_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/stargazers","contributors_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/contributors","subscribers_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/subscribers","subscription_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/subscription","commits_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/contents/{+path}","compare_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/merges","archive_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/downloads","issues_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/issues{/number}","pulls_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/pulls{/number}","milestones_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/milestones{/number}","notifications_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/labels{/name}","releases_url":"https://api.github.com/repos/gfx/MostPowerfulOrmInAndroid/releases{/id}","created_at":"2015-11-22T08:52:38Z","updated_at":"2015-11-22T08:52:39Z","pushed_at":"2015-11-23T08:07:04Z","git_url":"git://github.com/gfx/MostPowerfulOrmInAndroid.git","ssh_url":"git@github.com:gfx/MostPowerfulOrmInAndroid.git","clone_url":"https://github.com/gfx/MostPowerfulOrmInAndroid.git","svn_url":"https://github.com/gfx/MostPowerfulOrmInAndroid","homepage":null,"size":226,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"keima:master","ref":"master","sha":"e23c4a82bd3673a1802d19ca5648b1d1b0edbe4e","user":{"login":"keima","id":867470,"avatar_url":"https://avatars.githubusercontent.com/u/867470?v=3","gravatar_id":"","url":"https://api.github.com/users/keima","html_url":"https://github.com/keima","followers_url":"https://api.github.com/users/keima/followers","following_url":"https://api.github.com/users/keima/following{/other_user}","gists_url":"https://api.github.com/users/keima/gists{/gist_id}","starred_url":"https://api.github.com/users/keima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keima/subscriptions","organizations_url":"https://api.github.com/users/keima/orgs","repos_url":"https://api.github.com/users/keima/repos","events_url":"https://api.github.com/users/keima/events{/privacy}","received_events_url":"https://api.github.com/users/keima/received_events","type":"User","site_admin":false},"repo":{"id":26751090,"name":"MostPowerfulOrmInAndroid","full_name":"keima/MostPowerfulOrmInAndroid","owner":{"login":"keima","id":867470,"avatar_url":"https://avatars.githubusercontent.com/u/867470?v=3","gravatar_id":"","url":"https://api.github.com/users/keima","html_url":"https://github.com/keima","followers_url":"https://api.github.com/users/keima/followers","following_url":"https://api.github.com/users/keima/following{/other_user}","gists_url":"https://api.github.com/users/keima/gists{/gist_id}","starred_url":"https://api.github.com/users/keima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keima/subscriptions","organizations_url":"https://api.github.com/users/keima/orgs","repos_url":"https://api.github.com/users/keima/repos","events_url":"https://api.github.com/users/keima/events{/privacy}","received_events_url":"https://api.github.com/users/keima/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keima/MostPowerfulOrmInAndroid","description":null,"fork":false,"url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid","forks_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/forks","keys_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/teams","hooks_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/hooks","issue_events_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/events{/number}","events_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/events","assignees_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/assignees{/user}","branches_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/branches{/branch}","tags_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/tags","blobs_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/git/refs{/sha}","trees_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/statuses/{sha}","languages_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/languages","stargazers_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/stargazers","contributors_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/contributors","subscribers_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/subscribers","subscription_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/subscription","commits_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/commits{/sha}","git_commits_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/git/commits{/sha}","comments_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/comments{/number}","issue_comment_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/comments{/number}","contents_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/contents/{+path}","compare_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/merges","archive_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/downloads","issues_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues{/number}","pulls_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls{/number}","milestones_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/milestones{/number}","notifications_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/labels{/name}","releases_url":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/releases{/id}","created_at":"2014-11-17T10:08:48Z","updated_at":"2015-11-22T09:25:02Z","pushed_at":"2015-11-24T05:35:24Z","git_url":"git://github.com/keima/MostPowerfulOrmInAndroid.git","ssh_url":"git@github.com:keima/MostPowerfulOrmInAndroid.git","clone_url":"https://github.com/keima/MostPowerfulOrmInAndroid.git","svn_url":"https://github.com/keima/MostPowerfulOrmInAndroid","homepage":null,"size":219,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1"},"html":{"href":"https://github.com/keima/MostPowerfulOrmInAndroid/pull/1"},"issue":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/1"},"comments":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/keima/MostPowerfulOrmInAndroid/statuses/8db7ae908f7388182d707cd4c29d2857651f1a8e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"keima","id":867470,"avatar_url":"https://avatars.githubusercontent.com/u/867470?v=3","gravatar_id":"","url":"https://api.github.com/users/keima","html_url":"https://github.com/keima","followers_url":"https://api.github.com/users/keima/followers","following_url":"https://api.github.com/users/keima/following{/other_user}","gists_url":"https://api.github.com/users/keima/gists{/gist_id}","starred_url":"https://api.github.com/users/keima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keima/subscriptions","organizations_url":"https://api.github.com/users/keima/orgs","repos_url":"https://api.github.com/users/keima/repos","events_url":"https://api.github.com/users/keima/events{/privacy}","received_events_url":"https://api.github.com/users/keima/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":196,"deletions":4,"changed_files":9}}