Skip to content

Conversation

@0xferrous
Copy link
Contributor

No description provided.

@0xferrous 0xferrous changed the title chore: update to ratzilla 0.30.0 chore: update to ratatui 0.30.0 Dec 30, 2025
@0xferrous 0xferrous marked this pull request as ready for review December 30, 2025 13:36
@0xferrous
Copy link
Contributor Author

Formatting seems to be an issue, i formatted and built with cargo 1.94.0-nightly (3861f60f6 2025-12-19). Let me know if you need me to format with some specific version instead.

@orhun
Copy link
Member

orhun commented Dec 30, 2025

Have you tried building the examples locally?

For me demo/demo2 example fails with some errors. I think we also need to update tachyonfx as well.

Also turns the examples folder into a workspace for easy compiling of
all the examples at once and easy updating of shared dependencies.
Comment on lines 90 to 94
// NOTE: need to clone this because of signature and lifetime annotation change in
// Shader::cell_iter in https://github.com/junkdog/tachyonfx/pull/42/files#diff-5671d25d4f836e2bf332bb7fb82756277aa49796ac1f32565a3615d58ea943df
// apply effect to each cell in the area
let cell_iter = self.cell_iter(buf, area);
let filter_processor = self.filter_processor().cloned();
let cell_iter = CellIterator::new(buf, area, filter_processor.as_ref());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to hear better ways if this was skill issue on my part

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can copy the impl from https://github.com/junkdog/beamterm/blob/main/examples/canvas_waves/src/wave_effect.rs - it's been updated to the latest tachyonfx api

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't recall what the fix was, possibly the cell_iter.for_each_cell()

@0xferrous
Copy link
Contributor Author

@orhun fixed the examples and changed into workspace for easier spotting of compiler errors. Haven't ran all of them, but they all compile.

@0xferrous
Copy link
Contributor Author

unrelated, but i get very low fps on the demo app, like <=1

@orhun
Copy link
Member

orhun commented Dec 31, 2025

yeah... we're still investigating that low FPS issue. cc @junkdog

I think I'll merge this whenever we figure out what's going on. Thanks!

@junkdog
Copy link
Member

junkdog commented Dec 31, 2025

as @j-g00da pointed out on discord, we're missing the "layout-cache" feature for the ratatui dep. it should perform fine once it's added.

@0xferrous
Copy link
Contributor Author

0xferrous commented Dec 31, 2025

yeah, that's a lot better after enabling that feature. seems like a good default to enable in ratzilla?

@junkdog
Copy link
Member

junkdog commented Dec 31, 2025

yeah, i don't think it's viable running without the layout cache atm, at least until the perf issues are solved in ratatui

@j-g00da
Copy link
Member

j-g00da commented Dec 31, 2025

Yup generally layout cache should only be disabled on no_std targets and/or if you want to optimize for memory. Doesn't make sense at all do disable it on ratzilla.

@junkdog
Copy link
Member

junkdog commented Jan 4, 2026

lgtm

@0xferrous
Copy link
Contributor Author

fwiw dom backend on demo still tops out at 20 fps with average at 10 fps

@junkdog
Copy link
Member

junkdog commented Jan 5, 2026

demo still tops out at 20 fps with average at 10 fps

what fps are you getting with ratatui 0.29? the dom backend doesn't really perform that well when there's a lot going on (iirc, it spends a lot of cpu time in the browser's layout engine when cells change)

@0xferrous
Copy link
Contributor Author

looks more like 20-30, the thing i like about dom backend is being able to select text and copy it

@0xferrous
Copy link
Contributor Author

i stand corrected, seems like there is a way to copy text in webgl backend too

@junkdog
Copy link
Member

junkdog commented Jan 5, 2026

seems like there is a way to copy text in webgl backend too

yeah, as long as it's enabled with WebGl2BackendOptions::enable_mouse_selection

@junkdog
Copy link
Member

junkdog commented Jan 5, 2026

dom backend on demo

ratatui-0.30

image

ratatui-0.29

image

about the same in chrome (screenshot), but def slower in ff. maybe there's some more GC pressure from ratatui 0.30? firefox sometimes drops 150ms just to run the GC. it typically spends more than 16ms just to run the GC per frame 😅

Copy link
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  • The Cargo.lock needs to be updated
  • demo2 example has some deprecation warnings
  • I didn't experience any performance issues

Comment on lines +36 to +38
[patch.crates-io]
# remove this after ratatui gets updated upstream
tui-textarea = { git = "https://github.com/0xferrous/tui-textarea", rev = "b6bf812d1f5edab4f311f56d405a47341e9423cf" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think tui-textarea is not getting any updates, it might make sense to fork it in ratatui org and apply the patch and use that url here instead of my personal fork @orhun

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes... we should definitely do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool will update when it is forked on ratatui org, lmk

@junkdog junkdog merged commit 8cfe72b into ratatui:main Jan 7, 2026
7 checks passed
This was referenced Jan 23, 2026
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.

4 participants