Kicker/Documents optimization: Lazily build KFileItem
ClosedPublic

Authored by meven on Jan 4 2020, 11:42 AM.

Details

Summary

Save quite a few KFileItem instanciation.
On each document hovering several KFileItem were instanciated for nothing.

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20609
Build 20627: arc lint + arc unit
meven created this revision.Jan 4 2020, 11:42 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 4 2020, 11:42 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
meven requested review of this revision.Jan 4 2020, 11:42 AM
apol added a subscriber: apol.Jan 4 2020, 4:58 PM
apol added inline comments.
applets/kicker/plugin/recentusagemodel.cpp
251

I'm pretty sure we can/should depend on newer KF5. I'd say just update to 5.57 as the dependency on the root CMakeLists.txt.

meven updated this revision to Diff 72761.Jan 4 2020, 5:36 PM

Remove outdate ifdef, we depend on KF5 5.62

meven marked an inline comment as done.Jan 4 2020, 5:37 PM
meven added a reviewer: apol.Jan 5 2020, 12:49 PM
apol accepted this revision.Jan 6 2020, 3:16 AM
This revision is now accepted and ready to land.Jan 6 2020, 3:16 AM
This revision was automatically updated to reflect the committed changes.
broulik added a subscriber: broulik.Jan 7 2020, 9:38 AM

Would be lovely in the future to cache those items and make it a proper model with backing data rather than requesting everything on demand every time data is called.