Git Product home page Git Product logo

Comments (4)

knaeckeKami avatar knaeckeKami commented on August 11, 2024

yeah, we can add also benchmarks for different streams. are there any additional concrete Stream implementations that you know of, except for Dart (sync/async) and the Getx ones?

from changenotifier_benchmark.

tlvenn avatar tlvenn commented on August 11, 2024

Awesome, thanks again for putting those benchmarks in place to begin with. As for the streams, I am not aware of any others but the dart one and the 2 from Getx but that is probably a good starting point.

from changenotifier_benchmark.

escamoteur avatar escamoteur commented on August 11, 2024

If you create the Dart Stream as synchronous they are way faster than the GetXStream. And the whole reason to use Streams is asynchronous behavior which is not the case with GetX streams. The real replacement would be using ChangeNotifiers together with functional_listener.

from changenotifier_benchmark.

tlvenn avatar tlvenn commented on August 11, 2024

Ya that's a fair point and a big difference between ChangeNotifiers / Observables (Sync) and Streams (Async).
It seems there are also good reasons when you might want to use synchronous streams when you care about latency:

image

For example, it would seem that if you have a websocket and you are piping received events on a stream dedicated to it (Only producer is the ws handler), it could improve the latency a bit by using the synchronous stream controller as to skip a microtask for each event push.

from changenotifier_benchmark.

Related Issues (2)

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.