parent full representation to the proper window at start
ClosedPublic

Authored by mart on Feb 20 2018, 5:58 PM.

Details

Summary

this avoids some unwanted scene changes and speeds up the
first open a bit, also initialize the size of the dialog main item
so there is a resize less when the Dialog is first shown

Test Plan

difference in show time is already visible, tough still not perfect,
something else needs to improve as well

Diff Detail

Repository
R120 Plasma Workspace
Branch
arcpatch-D10692
Lint
No Linters Available
Unit
No Unit Test Coverage
mart created this revision.Feb 20 2018, 5:58 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 20 2018, 5:58 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Feb 20 2018, 5:58 PM
mart updated this revision to Diff 27633.Feb 20 2018, 7:04 PM
  • forces delegates creation in the item view
davidedmundson added inline comments.
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
29

How does this avoid a useless Dialog resize?

applets/systemtray/systemtray.cpp
346 ↗(On Diff #27633)

why did this need special code, but kicker (not kickoff) which also does its own didn't?

mart added inline comments.Feb 20 2018, 7:23 PM
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
29

otherwise mainItem starts being sized 0x0, then on Dialog showevent, it searches for its Layout property and resizes it based on that, this makes the resize being a noop which seems a sensible micro optimization

applets/systemtray/systemtray.cpp
346 ↗(On Diff #27633)

ah, if kicker doesn't use expandedrepresentation then it's not done there, tough i feel that whether qwindow::create is actually useful or not really would need better profiling, which i'm not sure how to do

hein added a subscriber: hein.Feb 20 2018, 7:25 PM

It does use it btw, just not for subdialogs.

broulik added inline comments.
applets/clipboard/contents/ui/Menu.qml
36 ↗(On Diff #27633)

Would that also help Kickoff's initial opening?

Also see D10557 which makes a huge difference without that..

mart added inline comments.Feb 21 2018, 11:53 AM
applets/clipboard/contents/ui/Menu.qml
36 ↗(On Diff #27633)

yeah, pretty much everything that has a listview in it, tough i don't know how to do it without hacing this ugly thing into every applet

D10557 seems indeed to make a difference

mart updated this revision to Diff 27710.Feb 21 2018, 5:11 PM
  • less hacks on this part, ones in libplasma enough
mart added a comment.Feb 21 2018, 5:12 PM

now it depends from D10722, which can preload it

mart updated this revision to Diff 27715.Feb 21 2018, 5:38 PM
  • new approach: parent full reps to the dialog only when needed
apol added a subscriber: apol.Feb 22 2018, 2:41 AM
apol added inline comments.
applets/systemtray/systemtray.h
30

Why?

mart added inline comments.Feb 22 2018, 10:51 AM
applets/systemtray/systemtray.h
30

eww, leftover

mart updated this revision to Diff 27767.Feb 22 2018, 11:12 AM

remove leftovers

broulik added inline comments.Feb 22 2018, 5:18 PM
applets/systemtray/package/contents/ui/main.qml
121

Shouldn't this be a binding?

mart added inline comments.Feb 22 2018, 5:23 PM
applets/systemtray/package/contents/ui/main.qml
121

not really, as is just an inizialization to have the size it will have when properly reparented

when the popup is open, it's put in the StackView, so is them propely anchored and all

putting a binding here would just make things more complicated and potentially different things that want to resize the same thing at once

broulik accepted this revision.Feb 23 2018, 10:48 AM
This revision is now accepted and ready to land.Feb 23 2018, 10:48 AM
mart updated this revision to Diff 27840.Feb 23 2018, 10:52 AM
  • remove useless z reassignment
This revision was automatically updated to reflect the committed changes.