Bug 431643 - Aurorae decoration engine is inefficient
Summary: Aurorae decoration engine is inefficient
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-15 15:41 UTC by Vlad Zahorodnii
Modified: 2023-10-07 00:28 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
hotspot (417.17 KB, image/png)
2021-01-15 15:42 UTC, Vlad Zahorodnii
Details
ftrace (168.06 KB, image/png)
2021-01-15 15:43 UTC, Vlad Zahorodnii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2021-01-15 15:41:55 UTC
At the moment, the Aurorae decoration engine may cause frame drops in some cases. It's worth looking into passing the opengl texture where the decoration is rendered directly to the opengl scene. Also, Aurorae decoration engine may hit the slow path in FrameSvgItem.
Comment 1 Vlad Zahorodnii 2021-01-15 15:42:31 UTC
Created attachment 134896 [details]
hotspot
Comment 2 Vlad Zahorodnii 2021-01-15 15:43:02 UTC
Created attachment 134897 [details]
ftrace
Comment 3 Duncan 2021-01-15 16:54:50 UTC
Might tackling this also fix (if only due to the reformulation) bug #425864, invisible aurorae-based windecos when used with libglvnd?

(I'm on wayland by default now, and actually patch the oxygen windeco so the titlebar's shrinkable enough that I don't any longer need the aurorae-based windeco I used to use to get short titlebars, different-bug #425874, but it'd still be nice to have the -864 X-only bug fixed.  I'm CCing so I can track and test in X when the code for this hits git.)
Comment 4 David Edmundson 2021-01-15 17:42:03 UTC
From the hotspot it appears the FrameSVGItem is the worst offender of those two issues.

Copying some context from the other report.

 * FrameSVGItem is a 9-tile system 

 * For each new size we can stretch (fastest), tile (fast) or re-render the SVG into a new texture (suuuuuuuuuper slow), based on hints

 * The default (for compatibility from Plasma 4 times) is to re-render

 * We are rendering /the entire/ frame behind the window. This is mostly the centre tile
 

Setting 
+            tileCenter = true;
in framesvgitem.cpp:572 

I don't think would break many themes.
Comment 5 David Rubio 2021-01-16 14:17:54 UTC
(In reply to David Edmundson from comment #4)
> From the hotspot it appears the FrameSVGItem is the worst offender of those
> two issues.
> 
> Copying some context from the other report.
> 
>  * FrameSVGItem is a 9-tile system 
> 
>  * For each new size we can stretch (fastest), tile (fast) or re-render the
> SVG into a new texture (suuuuuuuuuper slow), based on hints
> 
>  * The default (for compatibility from Plasma 4 times) is to re-render
> 
>  * We are rendering /the entire/ frame behind the window. This is mostly the
> centre tile
>  
> 
> Setting 
> +            tileCenter = true;
> in framesvgitem.cpp:572 
> 
> I don't think would break many themes.

With most of the themes I could test, it looks to work okay. It's also waay faster.
Comment 6 Marco 2023-01-29 10:57:11 UTC
I am on Plasma 5.26.5, and aurorae decorations are still much slower than the default Breeze Decoration. Resizing and moving windows feels much less fluid with aurorae.
Comment 7 Zane 2023-10-06 12:20:31 UTC
Still an issue on 5.27.8, resizing windows is really choppy. I'm using https://github.com/efskap/XBoomer
Comment 8 Duncan 2023-10-07 00:28:29 UTC
With the first qt6-based plasma6 (I'm assuming they're calling it that) release due in February, betas from December and possibly even an alpha in November (unknown whether it's still on for then or early/late Nov but that's only ~4-6 weeks out!!), there's very little chance a fix will hit qt5-based plasma5, particularly since the center-tile-focused efficiency fix discussed in comment #4 and comment #5 may well break /some/ existing third-party aurorae-based theme (even if as expected it's fine for ninety-some percent), and as an at least theoretically breaking change, at this point it just doesn't make sense to do it in 5.

But here's hoping they take the opportunity to do it for 6, since this would be the time to do any breaking changes there and the efficiency boost should be well worth it.  Maybe this new bug activity will get them on it (if they're not already doing it that way in 6).