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

improve x11 startup times #5923

Merged
merged 1 commit into from
Aug 11, 2024
Merged

improve x11 startup times #5923

merged 1 commit into from
Aug 11, 2024

Conversation

blukai
Copy link
Contributor

@blukai blukai commented Aug 10, 2024

related issue: #5802

requesting GetScreenResourcesCurrent instead of GetScreenResources brings startup times down from 1.5 seconds to 30 microseconds on my machine (measured with dumb printlns).

according to some findings GetScreenResourcesCurrent may return nothing, so i kept GetScreenResources there as a fallback, just in case, although I'm not 100% sure that it's necessary. see:

also worth to note that i3 does not rely on xcb_randr_get_screen_resources, but only on xcb_randr_get_screen_resources_current, see:

related issue: wez#5802

requesting `GetScreenResourcesCurrent` instead of `GetScreenResources`
brings startup times down from 1.5 seconds to 30 microseconds on my
machine (measured with dumb printlns).

according to some findings `GetScreenResourcesCurrent` may return
nothing, so i kept `GetScreenResources` there as a fallback, just in
case, although I'm not 100% sure that it's necessary. see:
- https://github.com/qt/qtbase/blob/c234700c836777d08db6229fdc997cc7c99e45fb/src/plugins/platforms/xcb/qxcbscreen.cpp#L963
- https://github.com/qt/qtbase/blob/c234700c836777d08db6229fdc997cc7c99e45fb/src/plugins/platforms/xcb/qxcbconnection_screens.cpp#L390

also worth to note that i3 does not rely on
`xcb_randr_get_screen_resources`, but only on
`xcb_randr_get_screen_resources_current`, see:
- https://github.com/search?q=repo%3Ai3%2Fi3%20get_screen_resources&type=code
@wez wez merged commit a0a415d into wez:main Aug 11, 2024
14 of 15 checks passed
wez added a commit that referenced this pull request Aug 11, 2024
@wez
Copy link
Owner

wez commented Aug 11, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants