Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make background drawing faster, most notably image decoding #4826

Open
2 tasks done
jwijenbergh opened this issue May 21, 2024 · 8 comments
Open
2 tasks done

Make background drawing faster, most notably image decoding #4826

jwijenbergh opened this issue May 21, 2024 · 8 comments

Comments

@jwijenbergh
Copy link
Contributor

Issue description

Currently background drawing is very slow (obviously depends on the image). The main culprit is the decoding of the wallpaper using cairocffi.pixbuf.decode_to_image_surface. This is really problematic as we have to re-render the wallpaper every time the screen layout changes. On wayland this can even result in short freezes when you disable/enable monitors. Possible approaches:

  • cache the image data, maybe not smart if large
  • do some sort of async thing with decoding?

ideas?

Version

git

Backend

Wayland (experimental)

Config

No response

Logs

No response

Required

  • I have searched past issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@jwijenbergh jwijenbergh changed the title Make background drawing faster Make background drawing faster, most notably image decoding May 21, 2024
@tych0
Copy link
Member

tych0 commented May 21, 2024

caching it seems reasonable, how big is one of these when they're parsed?

but i wonder: can we just not re-paint the background if it's the same after the screens are reconfigured?

@jwijenbergh
Copy link
Contributor Author

how big is one of these when they're parsed

sys.getsizeof(image) only returns 56 bytes haha, not sure if that is completely correct

but i wonder: can we just not re-paint the background if it's the same after the screens are reconfigured?

Yeah that is a good point. I could look at this, now we generate a whole new surface/buffer

@elParaguayo
Copy link
Member

@tych0 I don't think this is urgent for the next release. If wayland is now working on wlroots 0.17, we should do a release now.

@jwijenbergh
Copy link
Contributor Author

Yeah it's not, this has always been here

@tych0
Copy link
Member

tych0 commented May 21, 2024

If wayland is now working on wlroots 0.17, we should do a release now.

ok! I will go ahead and start the process :)

@jwijenbergh
Copy link
Contributor Author

Merci! I merged some last minute fixes, so good to go from my end

@tych0
Copy link
Member

tych0 commented May 21, 2024

https://github.com/qtile/qtile/releases/tag/v0.26.0 everything is grinding away, I will keep an eye on it and make sure it all goes green.

@jwijenbergh
Copy link
Contributor Author

Green! Woohoo! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants