Skip to content

[Notifications] Compress removal of notifications

Kai Uwe Broulik requested to merge work/kbroulik-noti-spam into master

When removing a notification, it is removed from the model, which will cause the view to update and move up an older notification, if any. If you now delete a bunch of notifications in quick succession we will create a dialog every time which then gets deleted again, causing another notification to move up, etc causing high CPU spikes and plasma freezes.

This patch compresses removing notifications and tries to announce consecuetive ranges of notifications to be removed in one go.

BUG: 423594 FIXED-IN: 5.20.5


@davidedmundson @fvogt

Comes with a unit test to check my Maths.

No longer able to freeze plasma by spawning a bunch of notifications and then clearing them all.

Used the following

main.cpp

Edited by Kai Uwe Broulik

Merge request reports