Fix startup performance on Qt5

Use more appropriate container (QList) for resume data queue buffer.
QVector in Qt5 has poor performance of the first element taking operation,
which is used to process the resume data queue. In Qt6, QVector is just an
alias for QList, so there was no problem there.

PR #18387.
Fixes #18341.
This commit is contained in:
Vladimir Golovnev 2023-01-16 14:45:12 +03:00 committed by GitHub
commit 2b20d5b260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -340,7 +340,7 @@ struct BitTorrent::SessionImpl::ResumeSessionContext final : public QObject
ResumeDataStorage *startupStorage = nullptr;
ResumeDataStorageType currentStorageType = ResumeDataStorageType::Legacy;
QVector<LoadedResumeData> loadedResumeData;
QList<LoadedResumeData> loadedResumeData;
int processingResumeDataCount = 0;
int64_t totalResumeDataCount = 0;
int64_t finishedResumeDataCount = 0;