1 (edited by teco049 2019-08-23 12:12:36)

Topic: MyVisualDatabase 5.5 stops responding

Hi,


just for fun to calculate the speed of SQLite I have created a small fun application.


It does nothing else as to insert many records in a table.


I have found a interesting issue. After approx. 70 records the application is no longer responding and no longer updating the screen. When the insert has been finished the application works as normal.


Because it is Delphi Code I have tried this also with Lazarus. The Lazarus Application does not stop responding.


Any idea what is the reason at MyVisualDatabase with the stopped responding?


Application is attached.


Have Fun.


btw.: lower the amount of lines to ad or you need to wait a little bit longer.  smile

Post's attachments

Attachment icon DB_CREATE.zip 9.74 kb, 281 downloads since 2019-08-23 

Re: MyVisualDatabase 5.5 stops responding

Hello teco049,


MVD is not multithread and the INSERT statement runs in the same memory thread as the main program.


Just added

Application.ProcessMessages;

after the SQL statment and the application stays responsive.


Have a good day


Cheers


Mathias

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: MyVisualDatabase 5.5 stops responding

You can increase speed of INSERTs if before you call function

SQLExecute('PRAGMA synchronous = OFF');

after inserts you must call function

SQLExecute('PRAGMA synchronous = FULL');
Dmitry.