+Note: Be conservative when using the Async API. SQLite has an inherently synchronous blocking API. A single thread pool thread is scheduled and used per asynchronous request, and a thread hop is required to return control to the UI thread when using Async/Await. Fine grain async requests can therefore result in a significant number of thread hops resulting in unnecessary additional latency. In general, it is best practice to schedule a logical sql block into a single call to IAsyncDatabase.Use() that either returns a value or an IEnumerable of values. If the IEnumerable of values is lazily evaluated, this can also result in better UI responsiveness, as the UI can process items as they are enumerated.
0 commit comments