ports/net/nheko/patches/patch-src_Cache_cpp

15 lines
754 B
Text

"Fruquent lag due to db sync" https://github.com/Nheko-Reborn/nheko/issues/1355
Backout d8669ccf3d4429e44caa87e2592b3bc3afa4e41c
Index: src/Cache.cpp
--- src/Cache.cpp.orig
+++ src/Cache.cpp
@@ -293,7 +293,7 @@ Cache::setup()
//
// 2022-10-28: Disable the nosync flags again in the hope to crack down on some database
// corruption.
- env_.open(cacheDirectory_.toStdString().c_str()); //, MDB_NOMETASYNC | MDB_NOSYNC);
+ env_.open(cacheDirectory_.toStdString().c_str(), MDB_NOMETASYNC | MDB_NOSYNC);
} catch (const lmdb::error &e) {
if (e.code() != MDB_VERSION_MISMATCH && e.code() != MDB_INVALID) {
throw std::runtime_error("LMDB initialization failed" + std::string(e.what()));