Local client parse the XML and update the SQLite table (C#). Is it possible to optimize?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
29 views
Written update client table in the SQLite DB. Downloads the XML from the server, parses and updates the data in the table. XML contains > 40,000 lines (and every month the number of rows increases), like this:

There was a question about optimization of this action, because the update takes at least 2 minutes. Originally written in C#. Want to rewrite everything in C++. Whether this be done, will there be some acceleration?
by | 29 views

2 Answers

0 like 0 dislike
First, we need to popratiloff what takes a lot of time.
If it is "update" (tobish for the execution SQL query) is re-writing will do nothing - must be something to do is base or queries.
by
0 like 0 dislike
There was a question about optimization of this action, because the update takes at least 2 minutes.

Well, it's a well-known joke that by default SQlite makes a transaction for each insert. Start a transaction and committing it once and all rows inserted per second the maximum.

You started to invent some megaspore acceleration, not examining the root of the problem. But the root of that transaction SQLite creates a file rollback, and when the same transactions 40000, it will be the same number of operations re-create the file. It's just great! what a heavy operation for the filesystem, and neither the processor nor multithreading at all to do with it. Might have known themselves, since 40000 is a small record it is not a volume.

The decision of Google in 20 seconds and is written in the FAQ on SQLite: www.sqlite.org/faq.html#q19
by

Related questions

0 like 0 dislike
1 answer
asked Mar 21, 2019 by v1z
0 like 0 dislike
4 answers
asked Jun 8, 2019 by baimkin
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,151 users