Some UI tweaks and some sqlite performance things.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3755 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-01-13 00:16:27 +00:00
parent 35b7eb511a
commit 7ba1e6980f
6 changed files with 8 additions and 5 deletions

View File

@ -12,6 +12,8 @@
void tf_ssb_db_init(tf_ssb_t* ssb)
{
sqlite3* db = tf_ssb_get_db(ssb);
sqlite3_exec(db, "PRAGMA journal_mode = WAL", NULL, NULL, NULL);
sqlite3_exec(db, "PRAGMA synchronous = NORMAL", NULL, NULL, NULL);
sqlite3_exec(db,
"CREATE TABLE IF NOT EXISTS messages ("
" author TEXT,"

View File

@ -41,7 +41,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
}
char app_blob_id[64] = { 0 };
sqlite3_busy_timeout(tf_ssb_get_db(ssb), 10000);
sqlite3_stmt* statement;
if (sqlite3_prepare(tf_ssb_get_db(ssb), "SELECT value FROM properties WHERE id = $1 AND key = 'path:' || $2", -1, &statement, NULL) == SQLITE_OK)
{

View File

@ -125,6 +125,7 @@ void tf_ssb_import(tf_ssb_t* ssb, const char* user, const char* path)
.work_left = 1,
};
import.req.data = &import;
sqlite3_busy_timeout(tf_ssb_get_db(ssb), 10000);
int r = uv_fs_scandir(tf_ssb_get_loop(ssb), &import.req, path, 0, _tf_ssb_import_scandir);
if (r)
{