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

Commits on Aug 10, 2024

  1. improve x11 startup times

    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
    blukai committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    f5a3290 View commit details
    Browse the repository at this point in the history