Skip to content

Bulk asynchronous downloader for multiple file hosts

Pre-alloc space for db

Jules-WinnfieldXeeb6d9565bac
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 9d229d688..58f5df7a3 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "2.27.2"
+__version__ = "2.27.3"
diff --git a/cyberdrop_dl/utils/sql_helper.py b/cyberdrop_dl/utils/sql_helper.py
index 5c4679971..e2a372708 100644
--- a/cyberdrop_dl/utils/sql_helper.py
+++ b/cyberdrop_dl/utils/sql_helper.py
@@ -24,8 +24,16 @@ class SQLHelper:
completed INTEGER NOT NULL,
PRIMARY KEY (path)
);"""
+ pre_alloc = "CREATE TABLE t(x);"
+ pre_alloc2 = "INSERT INTO t VALUES(zeroblob(25*1024*1024));" # 25 mb
+ drop_pre = "DROP TABLE t;"
self.curs.execute(create_table_query)
self.conn.commit()
+ self.curs.execute(pre_alloc)
+ self.curs.execute(pre_alloc2)
+ self.conn.commit()
+ self.curs.execute(drop_pre)
+ self.conn.commit()
await self.check_columns()
async def check_columns(self):