[clipboard] Limit length of clipboard text item visualisation
ClosedPublic

Authored by anthonyfieroni on Nov 12 2018, 5:39 PM.

Details

Summary

Applying regex to long text item (> 5000 symbols) is extremely slow and memory consuming.

Test Plan

Make a config over 16 records in Clipboard, copy some json string or whatever you have as long texts > 5000 symbols. I hat slow plasmashell, high cpu usage, slow running and over 700 MB of RAM.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
anthonyfieroni created this revision.Nov 12 2018, 5:39 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 12 2018, 5:39 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
anthonyfieroni requested review of this revision.Nov 12 2018, 5:39 PM
broulik accepted this revision.Nov 12 2018, 6:15 PM
broulik added inline comments.
applets/clipboard/contents/ui/TextItemDelegate.qml
33

I think 100 is better since it can wrap to up to three lines, fine otherwise

This revision is now accepted and ready to land.Nov 12 2018, 6:15 PM
This revision was automatically updated to reflect the committed changes.
anthonyfieroni marked an inline comment as done.