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

perf: speed up SetColors by ~15-25% #879

Merged
merged 1 commit into from
May 3, 2024

Commits on Apr 27, 2024

  1. perf: speed up SetColors by ~15-25%

    The SetColors command was executing SetForegroundColor and then
    SetBackgroundColor, which writes 2 extra characters per cell compared to
    writing both colors in one command. This resulted in about 15-25% more
    FPS (19->24 fps) on a fullscreen (171x51) app that writes every cell
    with a different foreground and background color, compared to separately
    using the SetForegroundColor and SetBackgroundColor commands (iTerm2, M2
    Macbook Pro).
    
    The app is the colors_rgb example in Ratatui, which writes every cell
    with a different foreground and background color in a loop. The
    CrosstermBackend was changed to use SetColors instead of
    SetForegroundColor and SetBackgroundColor.
    joshka committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    3b6c0a5 View commit details
    Browse the repository at this point in the history