broulik created this revision.
broulik added reviewers: Plasma, davidedmundson.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
  Notification uses Repeaters for everything. While this is acceptable for jobs 
and notifications, of which there are few, the history can turn into a very 
long list of items. Using a ListView solves memory consumption by creating 
delegates only as needed.
  Since regular notifications and notification history are quite entangled with 
each other, I had to configure the ListView from within the Notifications 
loader. To keep code changes as little as possible, the rest of the UI is just 
moved into the ListView header item.
  While this is quite an invasive patch for a feature frozen version it's the 
least invasive approach I could find and is quite an important memory leak fix 
for an LTS.
  
  BUG: 389132
  FIXED-IN: 5.12.0
  
  CHANGELOG: Fixed memory leak when there are a lot of items in notification 
history

TEST PLAN
  Looks just like before
  F5663539: Screenshot_20180119_093731.png 
<https://phabricator.kde.org/F5663539>
  
  - Spawned a gazillion notifications, verified that RAM consumption doesn't go 
through the roof.
  - Copied some files, could observe job status at the top of notifications, 
expanding details and canceling the job worked. Scrolling down did not result 
in the job delegate being destroyed.
  - Spawned a persistent notification, it showed up above the history
  - Dismissing persistenet notification in the popup by clicking X button 
worked fine
  - Dismissing history item by clicking X button worked fine
  - Interactive screenshot preview worked just fine when in the history
  - Disabled history, history was cleared
  - Disabled job progress, jobs weren't shown anymore

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D9978

AFFECTED FILES
  applets/notifications/package/contents/ui/NotificationDelegate.qml
  applets/notifications/package/contents/ui/Notifications.qml
  applets/notifications/package/contents/ui/main.qml

To: broulik, #plasma, davidedmundson
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart

Reply via email to