poc enhancement 160 feeds in 10 seconds
This commit is contained in:
parent
f60c6a2bc2
commit
10e84709e1
3 changed files with 9 additions and 3 deletions
|
@ -426,13 +426,13 @@ void FeedDownloader::updateOneFeed(ServiceRoot* acc,
|
||||||
feed->setStatus(Feed::Status::OtherError, app_ex.message());
|
feed->setStatus(Feed::Status::OtherError, app_ex.message());
|
||||||
}
|
}
|
||||||
|
|
||||||
feed->getParentServiceRoot()->itemChanged({feed});
|
// feed->getParentServiceRoot()->itemChanged({feed});
|
||||||
|
|
||||||
m_feedsUpdated++;
|
m_feedsUpdated++;
|
||||||
|
|
||||||
qDebugNN << LOGSEC_FEEDDOWNLOADER << "Made progress in feed updates, total feeds count " << m_feedsUpdated << "/"
|
qDebugNN << LOGSEC_FEEDDOWNLOADER << "Made progress in feed updates, total feeds count " << m_feedsUpdated << "/"
|
||||||
<< m_feedsOriginalCount << " (id of feed is " << feed->id() << ").";
|
<< m_feedsOriginalCount << " (id of feed is " << feed->id() << ").";
|
||||||
emit updateProgress(feed, m_feedsUpdated, m_feedsOriginalCount);
|
// emit updateProgress(feed, m_feedsUpdated, m_feedsOriginalCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedDownloader::finalizeUpdate() {
|
void FeedDownloader::finalizeUpdate() {
|
||||||
|
|
|
@ -215,6 +215,12 @@ Application::Application(const QString& id, int& argc, char** argv, const QStrin
|
||||||
|
|
||||||
QTimer::singleShot(1000, system(), &SystemFactory::checkForUpdatesOnStartup);
|
QTimer::singleShot(1000, system(), &SystemFactory::checkForUpdatesOnStartup);
|
||||||
|
|
||||||
|
auto ideal_th_count = QThread::idealThreadCount();
|
||||||
|
|
||||||
|
if (ideal_th_count > 1) {
|
||||||
|
QThreadPool::globalInstance()->setMaxThreadCount(2 * ideal_th_count);
|
||||||
|
}
|
||||||
|
|
||||||
qDebugNN << LOGSEC_CORE << "OpenSSL version:" << QUOTE_W_SPACE_DOT(QSslSocket::sslLibraryVersionString());
|
qDebugNN << LOGSEC_CORE << "OpenSSL version:" << QUOTE_W_SPACE_DOT(QSslSocket::sslLibraryVersionString());
|
||||||
qDebugNN << LOGSEC_CORE << "OpenSSL supported:" << QUOTE_W_SPACE_DOT(QSslSocket::supportsSsl());
|
qDebugNN << LOGSEC_CORE << "OpenSSL supported:" << QUOTE_W_SPACE_DOT(QSslSocket::supportsSsl());
|
||||||
qDebugNN << LOGSEC_CORE << "Global thread pool has"
|
qDebugNN << LOGSEC_CORE << "Global thread pool has"
|
||||||
|
|
|
@ -992,7 +992,7 @@ QPair<int, int> ServiceRoot::updateMessages(QList<Message>& messages, Feed* feed
|
||||||
|
|
||||||
// Some messages were really added to DB, reload feed in model.
|
// Some messages were really added to DB, reload feed in model.
|
||||||
items_to_update.append(feed);
|
items_to_update.append(feed);
|
||||||
getParentServiceRoot()->itemChanged(items_to_update);
|
// getParentServiceRoot()->itemChanged(items_to_update);
|
||||||
|
|
||||||
return updated_messages;
|
return updated_messages;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue