mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Reserve memory for file data buffers
This commit is contained in:
parent
c73d698718
commit
e262b86c44
2 changed files with 8 additions and 3 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue