From 1866f8c1e609aa3498ca0d0fc2f143944bd0a25b Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Mon, 9 Feb 2026 02:11:32 +0100 Subject: [PATCH] updater: Don't force file flushes when writing new files Using FILE_FLAG_WRITE_THROUGH causes a flush to disk on each file which is bad for performance. --- frontend/updater/updater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/updater/updater.cpp b/frontend/updater/updater.cpp index 978a2974f..db125e1ef 100644 --- a/frontend/updater/updater.cpp +++ b/frontend/updater/updater.cpp @@ -217,7 +217,7 @@ static string QuickReadFile(const wchar_t *path) static bool QuickWriteFile(const wchar_t *file, const void *data, size_t size) try { - WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, nullptr); + WinHandle handle = CreateFile(file, GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, 0, nullptr); if (handle == INVALID_HANDLE_VALUE) throw LastError();