mono - System.Data.Sqlite (C#) vs. Sqlite (C) performance -
mono - System.Data.Sqlite (C#) vs. Sqlite (C) performance -
situation: .net client app (c#, mono) downloads info web service (soap) , stores sqlite db. db interface system.data.sqlite under hood uses sqlite3.dll.
the db (130 mb) has few dozens of tables. 1 table particularly big , takes 90% of db size - 10000 of records blob columns. (largest blob has 260k.)
download on ipad takes 22 min. when commented out actual writing db, took 11 min, looks db takes 11 min, too. "db" mean layer above system.data.sqlite. don't know details yet. know db commands in transaction , there few transactions involved. (in other words transactions not problem.)
when dumped db using sqlite shell , measured c code calls sqlite3_exec() dumped string (this code far beingness optimal), got 50 secs (ipad). means sqlite c code can create db fast.
another interesting problem: download organized table table. tables (some of them having few mb) work ok. except largest table, download had reorganized few items (5) @ time. without measure download failed insufficient memory. probable explanation memory fragmentation. (mono has problems gc , not provide memory info.)
my feeling download process responsible smaller part of problem. downloads same size db. fragmentation should not problem. single-thread organization adds on latency.
however, sense biggest problem info processing in application.
it has parse several protocols (http, soap, xml) the info processing in system.data.sqlite , calling sqlite3.dll. involves allocations, marshalling etc.we'll doing more tests later, right inquire ideas. illustration welcome performance comparing of system.data.sqlite vs. raw sqlite. anybody?
i've been doing tests in past few days mono.data.sqlite , found insert performance terrible.
i'm seeing ~14,000 inserts per sec c# compared ~38,000 c equivalent. insert of string, string, string, string, string, string, datetime, in transaction using paramaterised statement inserting 1,024,000 rows. (same performance dropping number of rows downwards lot)
commenting out actual executenonquery , both c , c# through same number of iterations me of around 112,000 per sec (generating strings) in case problem coming mono handling interop sqlite.
these tests have been under macosx , have not tried on actual device due not having paid monotouch license see if improve.
sqlite mono
Comments
Post a Comment