Skip to content

Improve performance for windowed rendering#89

Merged
cxreiff merged 3 commits intoratatui:mainfrom
Runi-c:windowed_optimization
Feb 18, 2026
Merged

Improve performance for windowed rendering#89
cxreiff merged 3 commits intoratatui:mainfrom
Runi-c:windowed_optimization

Conversation

@Runi-c
Copy link
Contributor

@Runi-c Runi-c commented Feb 14, 2026

bevy_ratatui was dominating my frametimes with the current approach of allocating a new image each frame.

I profiled and wrote a fast-path to copy the pixel data with zero allocations and got quite the performance improvement: about a 10x speedup.

image

@cxreiff
Copy link
Collaborator

cxreiff commented Feb 18, 2026

Looks great, thank you for the optimization! Adjusted the comment as image creation actually fills in an alpha of zero, but gets immediately overwritten by 255 by get_pixmap_data_as_rgba.

@cxreiff cxreiff merged commit c23cbbf into ratatui:main Feb 18, 2026
7 checks passed
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