Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-07

sqlite slowdown in release vs Lazarus IDE

2 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Julius

Hi,

I wonder if someone could perhaps suggest what could be causing a rather large insert slowdown issue with a sqlite component.

I'm compiling in Debian Jessie, using qt widgetset, and Lazarus 1.6.

I've got a small database, about 200 items. In debug/IDE mode under Lazarus the insertion of these data is blindingly fast, less than an eyeblink. There is hardly a blip in CPU history window.

But when I build and use the release standalone version the same insert process takes 25 seconds, about 10,000 times slower. A single thread shows up in the CPU history window and hangs there during this time.

My program also supports a text DB (based on INI files). It is also blindingly fast, and in both IDE and standalone.

Literally, the only difference is not running through the IDE. I've used the debug, unoptimized version, which works perfectly in IDE, outside as standalone, and the slowdown remains.

The only difference in the project options are optimizations and debug information, but as I said, the slowdown is true of both optimized and unoptimized outside of the IDE.

Any ideas gratefully accepted.

Julius

Reply by email

Julius
to Julius

Hi,

I appear to have figured it out.

FWIW, I was using a single sqlite transaction per item insert. I tested today under a single transaction for all item inserts and it was very fast.

The question in my mind remains however. Why was this slowdown not apparent in the IDE??

In any case, all seems to be well.

Julius wrote
Hi, I wonder if someone could perhaps suggest what could be causing a rather large insert slowdown issue with a sqlite component.

Reply by email