From 670eec4953f923b2ee6c00edccd6fbad66bd0641 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Fri, 17 Nov 2023 18:20:34 +0100 Subject: Remove O_SYNC from low-level file-writing flags. The man page for open(2) says the following to the O_SYNC flag: 'O_SYNC provides synchronized I/O file integrity completion, meaning write operations will flush data and all associated metadata to the underlying hardware.' This flag results in a high delay when files are stored in casx, e.g., several seconds for medium-sized files such as 23 MB. Since just does not care about persistency, this strong synchronization mechanism is not required and is deactivated. --- src/buildtool/file_system/file_system_manager.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index d905f301..181cba27 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -1149,7 +1149,7 @@ class FileSystemManager { class LowLevel { static constexpr ssize_t kDefaultChunkSize = 1024 * 32; static constexpr int kWriteFlags = - O_WRONLY | O_CREAT | O_TRUNC | O_SYNC; // NOLINT + O_WRONLY | O_CREAT | O_TRUNC; // NOLINT static constexpr int kWritePerms = // 644 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; // NOLINT -- cgit v1.2.3