summaryrefslogtreecommitdiff
path: root/src/database/database.cpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-04-08 15:40:16 +1000
committerailurux <ailuruxx@gmail.com>2024-04-08 15:40:16 +1000
commitf20ca9583af5312eea65cf144803d00be6e50602 (patch)
treed6047ff952d6ad60a30ba038e6a5c72c64b8b0e7 /src/database/database.cpp
parent01ae3fee30704577f4ea37ed7f2132990135163c (diff)
parent96b62321c33ff5e146d52416dc5da3f0c240b4b0 (diff)
downloadtangara-fw-f20ca9583af5312eea65cf144803d00be6e50602.tar.gz
Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw
Diffstat (limited to 'src/database/database.cpp')
-rw-r--r--src/database/database.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp
index 06138983..48fb0c63 100644
--- a/src/database/database.cpp
+++ b/src/database/database.cpp
@@ -139,14 +139,14 @@ auto Database::Open(IFileGatherer& gatherer,
[&]() -> cpp::result<Database*, DatabaseError> {
leveldb::DB* db;
std::unique_ptr<leveldb::Cache> cache{
- leveldb::NewLRUCache(4 * 1024)};
+ leveldb::NewLRUCache(256 * 1024)};
leveldb::Options options;
options.env = sEnv.env();
options.write_buffer_size = 4 * 1024;
- options.max_file_size = 32;
+ options.max_file_size = 16 * 1024;
options.block_cache = cache.get();
- options.block_size = 512;
+ options.block_size = 2048;
auto status = leveldb::DB::Open(options, kDbPath, &db);
if (!status.ok()) {
@@ -299,7 +299,7 @@ auto Database::updateIndexes() -> void {
UpdateNotifier notifier{is_updating_};
leveldb::ReadOptions read_options;
- read_options.fill_cache = false;
+ read_options.fill_cache = true;
// Stage 1: verify all existing tracks are still valid.
ESP_LOGI(kTag, "verifying existing tracks");