artemsen / swayimg

Image viewer for Wayland
MIT License
379 stars 31 forks source link

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

Closed charbelnicolas closed 3 months ago

charbelnicolas commented 8 months ago

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

artemsen commented 8 months ago

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 =)

charbelnicolas commented 8 months ago

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

charbelnicolas commented 3 months ago

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

artemsen commented 3 months ago

it works flawlessly now

Ok, then I close the issue =)