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

Use a shared memory buffer for the X11 backend #38

Closed
notgull opened this issue Dec 21, 2022 · 4 comments · Fixed by #46 · May be fixed by rust-windowing/swbuf#23
Closed

Use a shared memory buffer for the X11 backend #38

notgull opened this issue Dec 21, 2022 · 4 comments · Fixed by #46 · May be fixed by rust-windowing/swbuf#23
Labels
enhancement New feature or request Xlib

Comments

@notgull
Copy link
Member

notgull commented Dec 21, 2022

The current X11 backend sends the image over the wire, which is slow and inefficient. We should probably use the MIT-SHM strategy for this crate if it's available.

(Also, we probably shouldn't create a new image every time we run the set_buffer command, but I think we can take care of that when we solve #37)

@ids1024
Copy link
Member

ids1024 commented Dec 21, 2022

if it's available

That extension has a copyright date of 1991. Is it ever not supported by modern X servers on modern OSes?

@notgull
Copy link
Member Author

notgull commented Dec 21, 2022

I think xvfb doesn't support it, but I'd have to double check. At the very least, libcairo falls back to normal image sends if it doesn't detect MIT-SHM, but that could just be legacy code.

@ids1024
Copy link
Member

ids1024 commented Dec 21, 2022

Yeah, that could just be legacy code in cairo. Though even the maintainers of libcairo might not be sure unless they remove it and see if anyone complains.

It's good to have the fallback if it's relevant in any modern context, but probably not if it is needed only on 2-3 decade old Unix systems that aren't going to be supported anyway.

@ids1024
Copy link
Member

ids1024 commented Dec 21, 2022

Oh, I guess shared memory also wouldn't be available with a remote X server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Xlib
3 participants