swayimg icon indicating copy to clipboard operation
swayimg copied to clipboard

swayimg can't keep up when panning a 160 Kb PNG

Open charbelnicolas opened this issue 11 months ago • 2 comments

Hello, it's me again, sorry for bringing another issue up, I'm really not looking to debug all of swayimg but I keep bumping into random performance issues.

Here is another comparison video between feh and swayimg when panning a 160 Kb PNG image at 100% size. As I've said before, I think swayimg could do much better, even more so than feh!

https://drive.google.com/file/d/1VQc1F4cch4wMtHGL6TQgn53AAdecVWqY/view?usp=sharing

I hope you can find the cause of the sluggishness...

This is the image I'm using:

uv_blueprint

charbelnicolas avatar Mar 29 '24 01:03 charbelnicolas

Swayimg works directly with display buffers, so all image transformations (scaling, positioning, memory copy, etc) falls on the CPU, which is relatively slow. To solve this problem we need to use the GPU (OpenGL) to render the images. I have some research in this way, but my prototype is not usable yet. Not now, but maybe I'll return to this issue a little later =)

artemsen avatar Mar 29 '24 05:03 artemsen

Cool, that's good to know! Thank you.

charbelnicolas avatar Mar 29 '24 05:03 charbelnicolas

The add event queue support has greatly helped with the panning of the images, it works flawlessly now, thank you!

charbelnicolas avatar Aug 01 '24 19:08 charbelnicolas

it works flawlessly now

Ok, then I close the issue =)

artemsen avatar Aug 02 '24 05:08 artemsen