From 52bf08dfd107e497e75ea6bf9993fb59c76b8cc2 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Tue, 31 May 2011 09:56:23 -0700 Subject: [PATCH] Fix #1869: Set the disk io read/write to bypass OS cache in Windows as suggested in http://code.google.com/p/libtorrent/issues/detail?id=166 --- deluge/core/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deluge/core/core.py b/deluge/core/core.py index 7a5971393..e385d6788 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -95,6 +95,11 @@ class Core(component.Component): # Set session settings self.settings.send_redundant_have = True + if deluge.common.windows_check(): + self.settings.disk_io_write_mode = \ + lt.io_buffer_mode_t.disable_os_cache_for_aligned_files + self.settings.disk_io_read_mode = \ + lt.io_buffer_mode_t.disable_os_cache_for_aligned_files self.session.set_settings(self.settings) # Load metadata extension