mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
(refractor) timer and warm up query
This commit is contained in:
1 parent
1b2ee0f691
commit
d6f2b145c3
13 files changed
+294
-47
No files matched your search
@@ -38,6 +38,7 @@ impl Database {
|
||||
PRAGMA jornal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
PRAGMA foreign_keys = ON;
|
||||
PRAGMA cache_size = -131072;
|
||||
",
|
||||
)?;
|
||||
|
||||
@@ -81,6 +82,13 @@ impl Database {
|
||||
let uri = format!("file:{}?mode=ro&immutable=1", path);
|
||||
|
||||
conn.execute("ATTACH DATABASE ?1 AS yomitan", [uri])?;
|
||||
|
||||
conn.execute_batch(
|
||||
r"
|
||||
PRAGMA yomitan.mmap_size = 3000000000; -- 3_000_000_000
|
||||
",
|
||||
)?;
|
||||
|
||||
self.yomitan_attached.store(true, Ordering::Release);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user