Comments (3)
It would be good to add some sort of metric around the cache size and hits. Possibly just logged using the tracing library, but perhaps worth investigating https://docs.rs/metrics/0.22.0/metrics/ or https://docs.rs/metered/0.9.0/metered/
from ratatui.
For reference, on my machine, the flex
example starts at about 1.4MB, a cache of 9800 fully grown makes it go to 3.5MB.
That's ~2.3 times the initial memory, but 9800 is a ridiculous value and in general 3.5MB is not that much memory.
Concerning by how much we should increase the value I'd go for 32
ish. flex
and constraints
run about fine with 100 and there are ridiculous/overcomplicated layouts.
I want to go more in depth on this and check out some projects to see how much layout to they use.
from ratatui.
9800
that's also about how many cells I have on my terminal screen. I suspect a good ballpark figure to use is Rows + Columns, not Rows * Columns. This allows for a layout to be specified for every row and column of the screen (which is likely rare, but may become more common if we start moving to using layout for e.g. each row of a table or similar.
So that's 171+51 = 222 for my laptop so why not make this arbitrarily double that amount and a bit more (500)?
from ratatui.
Related Issues (20)
- User Input example doesn't work with UTF-8 characters HOT 1
- Add related examples to docs and website HOT 3
- ParseColorError is not public
- Support block titles in top-right and bottom-right HOT 4
- Onboard to bencher, to start tracking benchmarks over time HOT 4
- Reuse std::fmt::Alignment HOT 3
- Running `cargo test` fails HOT 6
- Inconsistent behavior between `Line::from` and `Line::raw` HOT 3
- Allow bypassing diff and writing all to screen HOT 5
- RSX-based interface to reduce boilerplate code HOT 5
- Make methods / fields on buffer that deal with the underlying content index private.
- Italic Borders? HOT 1
- `clippy::same_name_method` with Stylize HOT 1
- Add a Buffer::fill method
- Prelude changes
- Add .next()/.prev() to ListState to make traversing a list of selectable items easier
- Consistent examples in ratatui HOT 2
- Add Stylize methods directly to Style HOT 3
- index out of bounds: the len is 17526 but the index is 17526 HOT 6
- Change examples folder structure HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratatui.