mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Performance improvements
- Use larger buffer size when writing uncompressed files (was libcurl's default of 16 kb, change it to 128 kb) - Uncompress the next MB of data, while it is hashing/writing to disk in seperate thread.
This commit is contained in:
parent
bd37916527
commit
0264af9b73
7 changed files with 57 additions and 20 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "downloadthread.h"
|
||||
#include <deque>
|
||||
#include <condition_variable>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
class _extractThreadClass;
|
||||
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
virtual void enableMultipleFileExtraction();
|
||||
|
||||
protected:
|
||||
char *_abuf;
|
||||
char *_abuf[2];
|
||||
size_t _abufsize;
|
||||
_extractThreadClass *_extractThread;
|
||||
std::deque<QByteArray> _queue;
|
||||
|
@ -41,6 +42,9 @@ protected:
|
|||
std::condition_variable _cv;
|
||||
bool _ethreadStarted, _isImage;
|
||||
QCryptographicHash _inputHash;
|
||||
int _activeBuf;
|
||||
bool _writeThreadStarted;
|
||||
QFuture<size_t> _writeFuture;
|
||||
|
||||
QByteArray _popQueue();
|
||||
void _pushQueue(const char *data, size_t len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue