AndroidDatabaseLibraryComparison icon indicating copy to clipboard operation
AndroidDatabaseLibraryComparison copied to clipboard

In complex trial, why is copyToRealmOrUpdate() being called for contacts and address items?

Open mateusgrb opened this issue 9 years ago • 0 comments

On Realm Complex Trial code(RealmTester.java), if you call realm.copyToRealm(finalAddressBooks);, all contacts and address items referenced by these address books will be inserted as well. So why do you need to call copyToRealmOrUpdate() for contacts and items in each address book? This seems to have a big impact on Realm's performance.

That change was added on this commit: https://github.com/Raizlabs/AndroidDatabaseLibraryComparison/commit/f79b8244f904e88ee8353a1b0ec52aee82c4d5f0#diff-254e581a054b5c06b307166748225016

I don't understand the reason for this change. To me it seems like the code before this commit was correct.

mateusgrb avatar Oct 30 '16 18:10 mateusgrb