Latte Dock findings and maybe useful to Plasma also...

Michail Vourlakos mvourlakos at gmail.com
Mon Feb 5 10:28:56 UTC 2018


Hello everyone,

It isnt a secret that Latte is trying to use internally as more code as
possible based on the plasma codepage solutions. These days I discovered
that  because of that, things fixed or improved in Latte could influence
and help Plasma also...

I can be wrong so correct me freely...

1) Memory Usage

I have noticed that plasma isnt freeing memory as easy and Latte had the
same issue... For cases such as Activities closing I would expect that the
memory redundancy for plasmashell should be also user visible. Latte had
exactly the same issue when it was changing layouts. The memory redundancy
wasnt observable. Playing around I found the following:

QQmlEngine:trimComponentCache()

it isnt as an intrusive function in my opinion because it removes only the
components that arent used at the specific time that is called. In Latte i
execute it whenever the moused leaves the panel/dock(I will probably move
it to layout closing event),. The memory gains are instantly visible,
dropping Latte memory usage in ksysguard around 50-100Mbyte.

So my idea is that if that function is called when an activity is closing,
Plasma should also notice such gains...


2) Latte in each master version supports multiple layouts running at the
same time based on the running Activities. That means that the Unity layout
for Unity Activity and Plasma layout for Plasma Activity are instantly
available. To achieve this I use a per-layout loading/unloading mechanism.
For the unloading part I was using the plasma way but I fall into a crash
that was pointing to systray. If I understood it correctly the containment
of the panel was deleted first and when the systray was deleting it was
sending an availableScreenRectChanged signal (from notifications I think)
but because the parent containment had been deleted it was crashing... I
fixed this by changing the order of deletion in my unload functions. I
delete first the systrays and afterwards all the rest containments. In
plasma (shellcorona) I think this is done with a flag indicating when we
are in delete mode in order to indicate when the crashing code to not be
executed...


Sorry for the big text...
I hope that the above can be of any use..

regards,
michail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180205/a91357e0/attachment.html>


More information about the Plasma-devel mailing list