mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Reserve memory for file data buffers
This commit is contained in:
@@ -3507,6 +3507,7 @@ void Session::handleTorrentResumeDataReady(TorrentHandle *const torrent, const l
|
||||
// isn't cheap too.
|
||||
|
||||
QByteArray out;
|
||||
out.reserve(1024 * 1024); // most fastresume file sizes are under 1 MB
|
||||
lt::bencode(std::back_inserter(out), data);
|
||||
|
||||
const QString filename = QString("%1.fastresume").arg(torrent->hash());
|
||||
|
||||
Reference in New Issue
Block a user