Hi I want to share something that i’m passing, so sorry if cannot have this kind of post here.
I have similar problem im my application, its really dificult to deserialize more than 1000 Json At Once. After searching a lot I founded that new versions of Xamarin have a lower performance on System.Reflection (I think most json parsers use this). In my project we Use JSON.Net to perform intense deserialize, and searching a bit I found that someone said that donwgrading to version 8.0.3 really improves json deserialize performance, maybe because its require a lower version of Xamarin, that uses another rules for System.Reflection . In fact I tried to downgrade but I have a really dificult to work with mono libs on Visual studio and spent too much time making the downgrade and yet not completing him. So I skiped this of my mind and have focus the current appp to get only the real data that he needs from Replication Channels (double check on sync routines and optmizing), and created somes “Mini-Json-Parsers” for match some things on CreateQuery() (parsing a stored json with less variable possible if the query returns true deserialize the huge one) I could have a gain of 30/60% of performance and this number go up after adding Async Queries too.
In My scenario out customer asked us to test the current solution that its for small markets business and tried on some big markets, and my up post could helped me prove to the team that the tech works very well.
To finish my system use the same Lib and couchbase Lite 1.4.1 and run against a Xamarin and a Windows 10 Professional, Its really impressive the better performance of JSON.Net on Windows 10 SO than Android with Xamarin, I really think that some problems I have its the current version of Xamarin, hope I could append some utility to this thread.
In Couchbase Lite 2 we don’t use JSON at all — the documents are stored in a binary format called Fleece that’s extremely fast to parse, and all the API access is through objects, so there’s no need for the app to work with JSON.
The API is synchronous because we want to keep it as similar as possible between platforms, and .NET, Java and Cocoa have very different mechanisms for async operations. But you can write your own async functions that wrap around our API.
In the case of a query, all the hard work is done in the execute method — the returned ResultSet contains all the query results. So you could write an async C# method that takes QueryParameters, then runs the Query on a background thread and returns the ResultSet.
For best performance you should have a separate Database instance for background tasks, because each Database can only perform one database operation at a time, so other methods will block while a query is executing.