Reduce CPU load of test parsing

Use a thread pool with reduced max thread count.

Task-number: QTCREATORBUG-18185
Change-Id: I18bd3de82365edaf21d8dcf9c89035da1ac74756
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2017-05-16 11:15:57 +02:00
parent 2dd48a2080
commit 83b8c8fc15
4 changed files with 106 additions and 39 deletions

View File

@@ -38,6 +38,10 @@ namespace Core {
class Id;
}
QT_BEGIN_NAMESPACE
class QThreadPool;
QT_END_NAMESPACE
namespace Autotest {
namespace Internal {
@@ -106,6 +110,7 @@ private:
QVector<ITestParser *> m_testCodeParsers; // ptrs are still owned by TestFrameworkManager
QTimer m_reparseTimer;
ITestParser *m_updateParser = nullptr;
QThreadPool *m_threadPool = nullptr;
};
} // namespace Internal