mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 00:06:16 -07:00
Add tuning options related to performance warnings
Related: #16462. PR #16538.
This commit is contained in:
parent
36c14ca587
commit
ac97ed685f
7 changed files with 95 additions and 6 deletions
|
@ -106,6 +106,7 @@ namespace
|
|||
DISK_CACHE,
|
||||
DISK_CACHE_TTL,
|
||||
#endif
|
||||
DISK_QUEUE_SIZE,
|
||||
OS_CACHE,
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
COALESCE_RW,
|
||||
|
@ -140,6 +141,7 @@ namespace
|
|||
PEER_TURNOVER,
|
||||
PEER_TURNOVER_CUTOFF,
|
||||
PEER_TURNOVER_INTERVAL,
|
||||
REQUEST_QUEUE_SIZE,
|
||||
|
||||
ROW_COUNT
|
||||
};
|
||||
|
@ -212,6 +214,8 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||
session->setDiskCacheSize(m_spinBoxCache.value());
|
||||
session->setDiskCacheTTL(m_spinBoxCacheTTL.value());
|
||||
#endif
|
||||
// Disk queue size
|
||||
session->setDiskQueueSize(m_spinBoxDiskQueueSize.value() * 1024);
|
||||
// Enable OS cache
|
||||
session->setUseOSCache(m_checkBoxOsCache.isChecked());
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
|
@ -319,6 +323,8 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||
session->setPeerTurnover(m_spinBoxPeerTurnover.value());
|
||||
session->setPeerTurnoverCutoff(m_spinBoxPeerTurnoverCutoff.value());
|
||||
session->setPeerTurnoverInterval(m_spinBoxPeerTurnoverInterval.value());
|
||||
// Maximum outstanding requests to a single peer
|
||||
session->setRequestQueueSize(m_spinBoxRequestQueueSize.value());
|
||||
}
|
||||
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
|
@ -498,6 +504,13 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
addRow(DISK_CACHE_TTL, (tr("Disk cache expiry interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_expiry", "(?)"))
|
||||
, &m_spinBoxCacheTTL);
|
||||
#endif
|
||||
// Disk queue size
|
||||
m_spinBoxDiskQueueSize.setMinimum(1);
|
||||
m_spinBoxDiskQueueSize.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxDiskQueueSize.setValue(session->diskQueueSize() / 1024);
|
||||
m_spinBoxDiskQueueSize.setSuffix(tr(" KiB"));
|
||||
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes", "(?)"))
|
||||
, &m_spinBoxDiskQueueSize);
|
||||
// Enable OS cache
|
||||
m_checkBoxOsCache.setChecked(session->useOSCache());
|
||||
addRow(OS_CACHE, (tr("Enable OS cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode", "(?)"))
|
||||
|
@ -759,6 +772,12 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
m_spinBoxPeerTurnoverInterval.setValue(session->peerTurnoverInterval());
|
||||
addRow(PEER_TURNOVER_INTERVAL, (tr("Peer turnover disconnect interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)"))
|
||||
, &m_spinBoxPeerTurnoverInterval);
|
||||
// Maximum outstanding requests to a single peer
|
||||
m_spinBoxRequestQueueSize.setMinimum(1);
|
||||
m_spinBoxRequestQueueSize.setMaximum(std::numeric_limits<int>::max());
|
||||
m_spinBoxRequestQueueSize.setValue(session->requestQueueSize());
|
||||
addRow(REQUEST_QUEUE_SIZE, (tr("Maximum outstanding requests to a single peer") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_out_request_queue", "(?)"))
|
||||
, &m_spinBoxRequestQueueSize);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue