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

2018-02-14 Thread Marco Martin
On lunedì 5 febbraio 2018 11:28:56 CET Michail Vourlakos wrote:
> 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...

Thanks!
indeed very interesting, i think we can do it every time an applet is deleted 
and should indeed save something. (not sure if would help on activity switch 
as things are not getting deleted there)

-- 
Marco Martin


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

2018-02-13 Thread Eike Hein

Hi Michael,

thanks for these findings!

I'll ask Marco what he thinks about the trimComponentCache thing ...

Cheers,
Eike


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

2018-02-05 Thread Michail Vourlakos
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