[Mono-dev] Mono.Data.Sqlite performance
David A Knight
david at ritter.demon.co.uk
Fri Jan 27 14:54:01 UTC 2012
I have been looking at changing an iOS app over to using Monotouch and run into an issue with Sqlite performance. Writing some test code (not running on a device) that just opens a database and does a number of inserts (in a transaction) the performance difference between C (using Core Foundation for unicode strings) and C# is massive. ~37k compared to ~14k inserts per second under MacOSX (including the iOS simulator) / Linux.
Looking at Mono.Data.Sqlite I can't see any code that would cause this and so have come to the conclusion (wrongly or rightly) that the difference in performance is down to Sqlite functions being called via P/Invoke and the overhead it causes. Is there anything that can be done to reduce this overhead that isn't already in place? Am I wrong that the difference is caused by the P/Invoke?
More information about the Mono-devel-list