Code Monkey home page Code Monkey logo

Comments (3)

joshka avatar joshka commented on June 5, 2024 1

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.

Valentin271 avatar Valentin271 commented on June 5, 2024

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 32ish. 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.

joshka avatar joshka commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.