I’m adding aprox 1 Million records in database. I’m doing upsert (code snippet below).
It is processing 80-100 records per second and this number reduces as data grows in DB.
SDK version
pod 'CouchbaseLite-Swift', '3.1.1'
Please let me know if I’m doing anything wrong here.
I’m not a cblite guy, but look at the served dashboard to see what the server is doing during the inserts.
Also - you might.get better performance by using smaller batches.
It’s not clear where the time most spent in the save method. If you clicked the > arrow on the [CBLCollection saveDocument:concurrencyControl:error], will it show more information?
Also, are you testing on the actual iPhone device or the simulator? If it’s an actual device, can you provide the info about the device including the iOS version?
What is the general size of the documents (and blobs if any)? If you can provide an example doc, it will be very helpful so we could use that similar docs to test it out.
Yes, we were able to reproduce the issue. It’s caused by a missing database index which is created lazily by the replicator. The fix is in progress. I will report here when the fix is merged in and about the version the fix will be included. Thanks for reporting this issue.
Hi @pasin, is there any update on this issue?
This is a big concern for us as it is degrading the app performance. I’ll highly appreciate it if this issue can be prioritized.
Thanks for checking back. The issue has been fixed, and the fix will be available in the next 3.1.6. We are still working on the release. I don’t have a specific timeline for the release, but it’s possible that it could be in about a mouth or so.
@kptp If you perform one replication, the issue disappears. The issue was because the index was created lazily on the first replication, so performing one will solve it permanently (for that database).
in the android 3.1.0 SDK, i also update the document by inBatch .it run slow too, sometimes slow more. about update one item per second! please fix in thd android also!