[KProcessList] Optimize KProcessList::processInfo
Needs ReviewPublic

Authored by hallas on Aug 16 2019, 4:28 PM.

Details

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

BUG: 410945

Diff Detail

Repository
R244 KCoreAddons
Branch
optimize_kprocesslist_processinfo
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15796
Build 15814: arc lint + arc unit
hallas created this revision.Aug 16 2019, 4:28 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 16 2019, 4:28 PM
hallas requested review of this revision.Aug 16 2019, 4:28 PM
apol added a subscriber: apol.Aug 18 2019, 12:27 AM

patch looks good overall.

src/lib/util/kprocesslist_unix.cpp
158–159

checking if it's empty is unnecessary.

171

Use QString::number()

hallas updated this revision to Diff 64913.Thu, Aug 29, 5:52 AM
hallas marked an inline comment as done.

Fixed review comments, rebased.

hallas marked an inline comment as done.Thu, Aug 29, 5:52 AM
hallas updated this revision to Diff 64914.Thu, Aug 29, 5:53 AM

Add bug reference

hallas edited the test plan for this revision. (Show Details)Thu, Aug 29, 5:55 AM