I noticed that loading the background was a significant portion of sddm's startup time and found that we didn't set a sourceSize and just load a 3200x2000 image
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma
Verified that the image isn't loaded multiple times due to changing sizes or property re-evaluation
Had to change anchors to manual width as anchors seem to set geometry separately in a later step where the image already started loading, with explicit width/height Image waits until they're set, so we load the image only once
Didn't really notice any impact on my machine but with 4K screen I would have loaded the full image anyway but might be noticeable on FHD or small laptops
Actually increases ram usage of sddm-greeter by 10 MiB here. I thought it would never load the image larger than it is? :/
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Actually increases ram usage of sddm-greeter by 10 MiB here. I thought it would never load the image larger than it is? :/
It won't. Maybe you're testing wrong.
sddm-theme/Background.qml | ||
---|---|---|
37–38 | no need to change this | |
41 | Multiplying by devicePixelRatio seems wrong. From QQuickImageBase: d->pix.load(qmlEngine(this), loadUrl, d->sourcesize * d->devicePixelRatio, options, d->providerOptions); but code there is a bit more complex |