[Qt-interest] Different speed for different-sized lists?
william.crocker at analog.com
william.crocker at analog.com
Tue Nov 2 17:06:52 CET 2010
Anatoly Burakov wrote:
> Hi all.
>
> I have noticed this strange behaviour a while ago and still can't figure
> out why is this happening.
>
> Basically, i have a "binary format" files (serialized QLists of objects)
> which i use to move data back and forth between several apps, one of
> which uses SQLite as a database engine. I have noticed that when i do
> import of, say, 1000 objects, the speed is about 3-4 objects per second
> (due to complex nature of data added to the database). However, when the
> list is 140'000 objects, the importing speed "magically" goes up to
> 20-30 objects per second. The code always stays the same (basically, a
> for(;;) loop with i < qlist.count() as a condition, so nothing special),
> only the amounts of data are changing.
>
> The database code is also nothing special - a QList of objects, each of
> them has another QList inside them, so it's a minimum of 2 INSERT's and
> one UPDATE per object. Statements are simplest possible so it's hard to
> get it wrong and i don't think it's the SQL code to blame.
>
> Why this could be happening?
>
Use a profiling tool to see exactly what your program is doing.
I use Quantify from IBM. You also what to run it on an
optimized/release build.
Bill
> Best regards,
> Anatoly
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list