Coder Social home page Coder Social logo

Comments (4)

psiberfunk avatar psiberfunk commented on June 23, 2024 1

Thanks ! @dalegaard : Slow is relative I guess.. I have 2-3 hour prints estimating in 5 seconds on my RasPi 4 while printing!

from klipper_estimator.

psiberfunk avatar psiberfunk commented on June 23, 2024

I'm not familiar with rust, but my guess here is that one approach that would scale reasonably well would be to analyze a "layer at a time" in-memory in cases of not having enough to take the whole GCODE file all at once, which is, I suspect, the issue from browsing the code briefly. I'm sure there's other ways to chunk it up as well, but I think in most cases a single layer should fit in the memory of most machines you'd want to run this on, even the relatively memory limited smaller Raspis.

from klipper_estimator.

dalegaard avatar dalegaard commented on June 23, 2024

Estimation mode indeed relies on loading the entire file, so it can't reasonably run on a Pi currently. Post processing mode works fine though, as it runs in constant memory.

I don't really see the use case for estimate on weak machines as it's mainly a tool for optimization. Change something, run estimate, see how time changed, repeat. Since the pi is so slow it'll take a long time for each run, and so isn't particular useful.

For large files on Pi, a simple work around is enabling a swap file.

At some point estimation mode could definitely be improved to aggregate incrementally, the dataset in memory should still be reasonably small.

Best regards,
Lasse

from klipper_estimator.

dalegaard avatar dalegaard commented on June 23, 2024

I just released a v1.1.0 where estimate now runs in constant space. This should allow it to work on the Raspberry Pi as well, but of course it'll still probably be a bit slow :-)

Best regards,
Lasse

from klipper_estimator.

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.