mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Merge pull request #11422 from Chocobo1/buffer
Reserve memory for file data buffers
This commit is contained in:
commit
6da39d9279
2 changed files with 8 additions and 3 deletions
|
@ -3560,6 +3560,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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue