From 0d5afa4ff5fcce34192a0e71e59e41091062aa56 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 26 Aug 2025 20:56:28 +0800 Subject: [PATCH] Optimizing SQLite performance https://github.com/2dust/v2rayN/issues/7835 --- v2rayN/ServiceLib/Helper/SqliteHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Helper/SqliteHelper.cs b/v2rayN/ServiceLib/Helper/SqliteHelper.cs index 1561d3a5..959d5ff6 100644 --- a/v2rayN/ServiceLib/Helper/SqliteHelper.cs +++ b/v2rayN/ServiceLib/Helper/SqliteHelper.cs @@ -26,7 +26,7 @@ public sealed class SQLiteHelper public async Task InsertAllAsync(IEnumerable models) { - return await _dbAsync.InsertAllAsync(models); + return await _dbAsync.InsertAllAsync(models, runInTransaction: true).ConfigureAwait(false); } public async Task InsertAsync(object model) @@ -46,7 +46,7 @@ public sealed class SQLiteHelper public async Task UpdateAllAsync(IEnumerable models) { - return await _dbAsync.UpdateAllAsync(models); + return await _dbAsync.UpdateAllAsync(models, runInTransaction: true).ConfigureAwait(false); } public async Task DeleteAsync(object model)