mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Reenable OS cache on Windows
This commit is contained in:
parent
72a06ad176
commit
041540de6b
1 changed files with 0 additions and 6 deletions
|
@ -400,12 +400,6 @@ void QBtSession::configureSession() {
|
||||||
int cache_size = pref.diskCacheSize();
|
int cache_size = pref.diskCacheSize();
|
||||||
sessionSettings.cache_size = cache_size ? cache_size * 64 : -1;
|
sessionSettings.cache_size = cache_size ? cache_size * 64 : -1;
|
||||||
qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB";
|
qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB";
|
||||||
// Disable OS cache to avoid memory problems (uTorrent behavior)
|
|
||||||
#ifdef Q_WS_WIN
|
|
||||||
// Fixes huge memory usage on Windows 7 (especially when checking files)
|
|
||||||
sessionSettings.disk_io_write_mode = session_settings::disable_os_cache;
|
|
||||||
sessionSettings.disk_io_read_mode = session_settings::disable_os_cache;
|
|
||||||
#endif
|
|
||||||
#if LIBTORRENT_VERSION_MINOR > 15
|
#if LIBTORRENT_VERSION_MINOR > 15
|
||||||
sessionSettings.anonymous_mode = pref.isAnonymousModeEnabled();
|
sessionSettings.anonymous_mode = pref.isAnonymousModeEnabled();
|
||||||
if (sessionSettings.anonymous_mode) {
|
if (sessionSettings.anonymous_mode) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue