Coder Social home page Coder Social logo

Comments (5)

balloob avatar balloob commented on July 25, 2024 2

So I just added a PR that introduces hass.async_add_executor_job. This function could probably replace like 80% of all calls to async_add_job. One thing that I like about this is that it will make it clear where we are using the executor.

from architecture.

balloob avatar balloob commented on July 25, 2024 1

We can't add a parameter to the function to make it choose something.. what you're proposing is a new function.

We were talking about that the other day with @andrey-git. I'm on my phone so don't know the pr anymore but we had list to split it up

from architecture.

balloob avatar balloob commented on July 25, 2024

Found the comment. home-assistant/core#14429 (comment)

As initial plans were already laid out in that comment, I don't mind if we add a new function async_add_executor_job that behaves similar to async_add_job for threaded functions.

from architecture.

pvizeli avatar pvizeli commented on July 25, 2024

My problem with split the code is, that's never possible to cleanup the old code. At the end we mess the code base with a new function for maybe 400ms per 1milion requests.

I think we shold focus for a clean code base (core) they work as simple as possible. For Typing. We use python and that give this project the magic while we can do stuff that are not possible in other language. For runtime, typing make no change in python and that mean it's not usable.

from architecture.

pvizeli avatar pvizeli commented on July 25, 2024

Yeah I'm fine with this function but I say only that it's never been possible to cleanup the code base and we need maintain this two function with same functionality until the end of home-assistant asyncio usage :)

from architecture.

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.