mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Don't sync db on every sync
This fixes some lag, when Nheko is running, which could affect Nheko and even other applications by excessively calling fsync. This should be fine, since all filesystems seem to guarantee order and in most cases, the modified pages are still written. In the worst case we should only lose the last /sync results or similar.
This commit is contained in:
parent
dc1dd6e2e6
commit
65a4c85ed4
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ Cache::setup()
|
|||
// NOTE(Nico): We may want to use (MDB_MAPASYNC | MDB_WRITEMAP) in the future, but
|
||||
// it can really mess up our database, so we shouldn't. For now, hopefully
|
||||
// NOMETASYNC is fast enough.
|
||||
env_.open(statePath.toStdString().c_str(), MDB_NOMETASYNC);
|
||||
env_.open(statePath.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" +
|
||||
|
|
Loading…
Reference in a new issue