فهرست منبع

fix(sqlite): revert to default page cache size (#10362)

While we're figuring out optimal defaults, reduce the page cache size to
the compiled-in default. In my computer this makes no difference in
benchmarks. In forum threads, it solved the problem of massive memory
usage during initial scan.

Signed-off-by: Jakob Borg <[email protected]>
Jakob Borg 3 ماه پیش
والد
کامیت
f48782e4df
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      internal/db/sqlite/db_open_cgo.go
  2. 1 1
      internal/db/sqlite/db_open_nocgo.go

+ 1 - 1
internal/db/sqlite/db_open_cgo.go

@@ -14,5 +14,5 @@ import (
 
 const (
 	dbDriver      = "sqlite3"
-	commonOptions = "_fk=true&_rt=true&_cache_size=-65536&_sync=1&_txlock=immediate"
+	commonOptions = "_fk=true&_rt=true&_sync=1&_txlock=immediate"
 )

+ 1 - 1
internal/db/sqlite/db_open_nocgo.go

@@ -15,7 +15,7 @@ import (
 
 const (
 	dbDriver      = "sqlite"
-	commonOptions = "_pragma=foreign_keys(1)&_pragma=recursive_triggers(1)&_pragma=cache_size(-65536)&_pragma=synchronous(1)"
+	commonOptions = "_pragma=foreign_keys(1)&_pragma=recursive_triggers(1)&_pragma=synchronous(1)"
 )
 
 func init() {