GithubHelp home page GithubHelp logo

Comments (3)

maximkulkin avatar maximkulkin commented on May 24, 2024

Yeah, I've seen that problem. Looks like cJSON library we use to build JSON responses is not very memory efficient (accessories JSON for Thermostat on my tests takes ~16K, then you need space for buffer to render it into string). ESP with my HomeKit library has ~27K. Also, each new client is handled in a new task, which also takes ~4K.
So, going forward I'm going to investigate other options for rendering JSON (maybe writing my own, more memory efficient library). Also, I will push a patch that I had for a while which modifies server to handle all clients in a single task which should improve memory requirements for each client. Each client still requires a separate 1K buffer for decoding data though.

from esp-homekit.

maximkulkin avatar maximkulkin commented on May 24, 2024

BTW, if you'd like to join our (private) Slack channel, send me an email and I will send you invite

from esp-homekit.

maximkulkin avatar maximkulkin commented on May 24, 2024

Should be fixed now: I rewrote JSON generation with a much more memory efficient one.

from esp-homekit.

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.