Android Question SQLCipher async "vacuum"?

jtare

Active Member
Licensed User
Longtime User
It is possible to run asynchronously "vacuum" in SQL? specifically in SQLCipher?

Doing a vacuum take so much time and freezes the app, so I'm trying to run it asynchronously using the following code:
From the KeyValueStore class module:
B4X:
Public Sub vacuum
    sql1.AddNonQueryToBatch("VACUUM",Null)
    Dim SenderFilter As Object = sql1.ExecNonQueryBatch("SQL1")
    Wait For (SenderFilter) SQL1_NonQueryComplete (Success As Boolean)
    Log("NonQuery: " & Success)
End sub
I don't know if this is right, it happens super fast, the log(success) triggers immediately. But if I run it non async "sql1.ExecNonQuery("VACUUM")" it takes way more time like if its actually doing something, with the async method it seems to be doing nothing.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…