Jump to content

_SQLite_Startup() 42 seconds to finish


Go to solution Solved by BakedCakes,

Recommended Posts

Posted

I use SQLite in a number of applicatios and _SQLite_Startup finishes in less than a second.

This function has been used no less than 1000 times in the near past.

Suddenly, it is very slow to finish.

Last test was 42 seconds.

It finishes without any error.

What can cause this? Everything else is running smoothly on the laptop.

 

Posted

Weird, Weird

After closing the laptop lid and hibernating since my original post, _SQLite_Startup now takes about 2 seconds now.

Nothing else has been done.

 

This happened once before, a few months ago.

 

  • Solution
Posted (edited)

What is your AutoIt version? Before version 3.3.14.3 (3.3.14.2?) _SQLite_Startup() used to download sqlite dll from AutoIt's servers:

https://www.autoitscript.com/autoit3/docs/history.htm

Quote

3.3.14.3 (2nd February, 2018) (Release)

3.3.14.2 (18th September, 2015) (Release)

  • Changed: _SQLite_Startup() no longer automatically downloads DLL files. THIS IS A SCRIPT BREAKING CHANGE

It could be that you rely on _SQLite_Startup() to download the dll for you and AutoIt servers throttle the download speed, causing the long download time you are observing.

You can avoid having to download the dll if you bundle it alongside your script (or put it in some specific system directories) -- see the documentation for _SQLite_Startup() for more information.

Edited by BakedCakes
Posted

OK,

Now its fixed , after wracking my brain for hours.

It seems that if you use the statement "_SQLite_Startup() the needed dll is downloaded,  from where  have no idea. This explains why sometimes the process is slow and other times relatively fast.

However, in searching for sqlite3.dll, I found it in about 20 other locations, each with a different date ad size. It seems that there are various apps on my PC that use _SQLite.

So I copied the newest one to my @Script directory and now _SQLite_Startup finishes instantly. 

FYI its dated 03/09/2016. 593kb

Posted

Baked Cakes

You are confirming what I suspected.

However, if AutoIt is downloading a dll fie, why would not it put it somewhere and leave it there so that it doest have to be downloaded every time a script is run???

Makes no sense to me.

Posted (edited)
2 hours ago, AutoitMike said:

However, if AutoIt is downloading a dll fie, why would not it put it somewhere and leave it there so that it doest have to be downloaded every time a script is run???

Makes no sense to me.

No idea why it doesn't cache it. The whole idea of _SQLite_Startup() automatically downloading the dll makes no sense to me, glad that it doesn't do that in newer versions.

2 hours ago, AutoitMike said:

However, in searching for sqlite3.dll, I found it in about 20 other locations, each with a different date ad size. It seems that there are various apps on my PC that use _SQLite.

So I copied the newest one to my @Script directory and now _SQLite_Startup finishes instantly. 

FYI its dated 03/09/2016. 593kb

You can download the latest 32-bit and 64-bit SQLite dlls from https://www.sqlite.org/download.html. Looks like the current one is v3.39.3 from 2022-09-05.

Alternatively, AutoIt installs AutoSQLiteUpdateIt utility, which ultimately links to https://www.autoitscript.com/autoit3/pkgmgr/sqlite/, but it has a bit dated versions of SQLite.

Quote

Now its fixed , after wracking my brain for hours.

All you had to do is to read the documentation for _SQLite_Startup() function. Not the online one as that one is for the latest AutoIt version, but the one you have installed on your system. (Though the online one would probably also hint on a dll needed to be downloaded).

Edited by BakedCakes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...