Git Product home page Git Product logo

Comments (6)

alexanderhiam avatar alexanderhiam commented on July 30, 2024

Thanks for letting me know; I added a bit of delay into the event loop, and it should be down to around 50% CPU usage now. That's about as good as I can get it without really slowing it down. I plan to eventually interface a real event-driven framework like Twisted, but for now EventIO does an OK job.

from pybbio.

cbr1k avatar cbr1k commented on July 30, 2024

Thank you very much for your great works.

from pybbio.

bduhan avatar bduhan commented on July 30, 2024

I have been using PyBBIO in Tornado's IOLoop and things are working well so far.

from pybbio.

cbr1k avatar cbr1k commented on July 30, 2024

Bduhan, the I/O event is working but it cause the CPU usage very high. You have to check CPU usages with top command.

from pybbio.

bduhan avatar bduhan commented on July 30, 2024

Thank you cbr1k, I was mainly suggesting that alexanderhiam look into using Tornado or 'select.epoll' as an alternative to the polling loop in EventIO here. Both of these methods support adding/removing monitored FDs while the loop is running and Tornado has some nicer (low overhead) mechanisms for scheduling work in the future or after another action has completed.

As an anecdote, I have four devices that clock data into to my BeagleBone using edge triggered interrupt inputs (configured through sysfs) which are added and removed from Tornado's IOLoop on demand/schedule. When all four are enabled and a browser client is watching the data (highcharts, websockets) the CPU load for this process stays around 10-20%.

from pybbio.

alexanderhiam avatar alexanderhiam commented on July 30, 2024

Thanks bduhan, Tornado definitely sounds like a good option, I'll take a look at it.

from pybbio.

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.