Bug 388808

Summary: RubberBand has repeated large texture uploads, causing visual lag
Product: [Plasma] plasmashell Reporter: Gianni <gianni_2295>
Component: Desktop icons & Folder View widgetAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: minor CC: akozlovskiy119, aspotashev, butirsky, kde, kde, kdedev, magiblot, nate, plasma-bugs, saileshpoudel0, sigmund.haydin
Priority: HI    
Version First Reported In: 5.10.5   
Target Milestone: 1.0   
Platform: Kubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=493376
https://bugs.kde.org/show_bug.cgi?id=403563
Latest Commit: Version Fixed In: 6.3.0
Sentry Crash Report:
Attachments: sluggish animation of rectangle selection on the desktop

Description Gianni 2018-01-11 14:12:41 UTC
Created attachment 109795 [details]
sluggish animation of rectangle selection on the desktop

Plasma version: 5.10.5
OS: Kubuntu 17.10
Compositor used: XRender
Graphics: Mesa DRI Intel(R) 945GM

When I draw a selection rectangle on the desktop with the cursor, the draw animation is slow/sluggish, while it should be fluid.
Drawing a selection rectangle on other places, such as a dolphin window, shows the correct behaviour and the animation is fluid.

I'm attaching a video showing the animation first on the desktop and then on a dolphin window, so to highlight the difference. In the video it's less apparent than what it really is but it should still give an idea.
Comment 1 Gianni 2018-08-09 08:34:12 UTC
Update:
Bug is still present on

Plasma version: 5.13.5
OS: KDE neon 5.13
Compositor used: XRedender/OpenGL 2.0
Graphics: Mesa DRI Intel(R) 945GM

I discovered that the bug doesn't show itself if I type "plasma renderer" into krunner and select "Rendering backend = software".

I'd like to add that it's not just the rectangle selection animation that is sluggish, but every interaction with the desktop, such as moving objects, selecting text in notes and so on.
Comment 2 Gianni 2018-08-09 09:33:02 UTC
*Plasma version: 5.13.4
Comment 3 David Edmundson 2018-08-09 12:07:46 UTC
I don't want to have generic "it's sluggish" reports. As per that other thread the hardware is struggling with GL QtQuick.

But in this case that hardware has highlighted a weak spot we should optimise regardless.

RubberBand::RubberBand(QQuickItem *parent) : QQuickPaintedItem(parent)

We're uploading a new texture the size of the band every single mouse move. Texture uploads are one of the slowest things we can do.

A few thoughts:
 * Do we even want the QStyle theme on plasma? If not, we can just use a Rectangle / FrameSVG 
 
 * If we do, we should render once and 9-tile it
Comment 4 Eike Hein 2018-08-09 12:11:03 UTC
Yeah, this has always been one of those "we know it's slow and just haven't gotten around to optimizing it yet" things yet.

My one requirement is that FV doesn't hardcode the appearance of the rubberband. If it comes from QStyle or the Plasma theme I don't care much. I think consistency is nice, though.
Comment 5 Gianni 2018-08-09 13:43:49 UTC
(In reply to David Edmundson from comment #3)
> I don't want to have generic "it's sluggish" reports. As per that other
> thread the hardware is struggling with GL QtQuick.

I never meant to file a generic bug, but I couldn't produce a better description for what I saw. I entrusted the explanation of the problem to the appended video. I thought that if the "rubberband" was working on dolphin it ought to work the same way also on the bare desktop.
I'm sorry if I caused confusion.

> But in this case that hardware has highlighted a weak spot we should
> optimise regardless.

Glad to hear that.
Comment 6 Nate Graham 2021-08-09 02:01:49 UTC
*** Bug 419885 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-04-10 01:22:23 UTC
*** Bug 450374 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2023-04-10 01:22:26 UTC
*** Bug 427506 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2024-12-12 17:26:41 UTC
*** Bug 497378 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2024-12-13 14:55:29 UTC
Pretty much fixed by the changes to fix Bug 388808!
Comment 11 TraceyC 2024-12-13 15:39:05 UTC
*** Bug 497378 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2024-12-13 16:21:56 UTC
(In reply to Nate Graham from comment #10)
> Pretty much fixed by the changes to fix Bug 388808!
Uhh I meant Bug 493376, sorry.