This is unnecessarily slow when we already know which PID we want.
CC'ing original David who wrote it
Yeah I see :) I am working on a fix
I forget to mention this bugreport in the patch commit message :/ https://phabricator.kde.org/D23205
Git commit e16dda4d50bf9e51f1ec1f388f1267bda1c89417 by David Hallas. Committed on 15/12/2019 at 06:53. Pushed by hallas into branch 'master'. [KProcessList] Optimize KProcessList::processInfo Summary: Optimize KProcessList::processInfo on unix so that it doesn't iterate over all processes and then filter the list to the requested process. Instead refactor the code that fetches process info from a single process and use that function. Test Plan: Unit Test Reviewers: davidedmundson, broulik, mpyne Reviewed By: mpyne Subscribers: mpyne, apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D23205 M +0 -15 src/lib/util/kprocesslist.cpp M +64 -51 src/lib/util/kprocesslist_unix.cpp M +15 -0 src/lib/util/kprocesslist_win.cpp https://commits.kde.org/kcoreaddons/e16dda4d50bf9e51f1ec1f388f1267bda1c89417