D9240: [RunnerManager] Use QThread::idealThreadCount() instead of going through Solid
Kai Uwe Broulik
noreply at phabricator.kde.org
Thu Dec 7 14:21:36 UTC 2017
broulik created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
We query Solid for processors causing a ton of processing to be done just to get the number of CPUs and then some magic math to determin the thread count. Just use `QThread::idealThreadCount()` for simplicity.
TEST PLAN
It spent 30ms doing this on startup, now it's like 0.05ms
The previous code would assign my quadcore machine that is not hyper-threading capable 8 threads, now it gets 4 instead. I do have the feeling that occasionally the baloo runner blocks the calculator but we need to observe whether this patch makes performance worse but from random testing it doesn't seem like a big deal.
REPOSITORY
R308 KRunner
REVISION DETAIL
https://phabricator.kde.org/D9240
AFFECTED FILES
CMakeLists.txt
src/CMakeLists.txt
src/runnermanager.cpp
To: broulik
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171207/a2fed3a6/attachment.html>
More information about the Kde-frameworks-devel
mailing list