Coder Social home page Coder Social logo

kairo's People

Contributors

3shain avatar fossabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kairo's Issues

Understand the change propagation model

Hi 3Shain,

I saw this short benchmark that compares how reactive libraries might avoid doing unnecessary computations:

https://github.com/3Shain/kairo/blob/6e1a3b87a5a0820cdf5a355008e5bde097aca8a4/benchmarks/cases/avoidable.ts

This kind of graph traversal is really interesting to me. I've tried comparing it to @lord's graph in this thread salsa-rs/salsa#41 (comment) which also deals with avoiding expensive work.

2022-01-14-Note-02-21

I've tried multiple times to map out your avoidable.ts but am having a hard time imagining the dirty marking of each cell and the decision of whether to propagate the change - possibly because the code is a generic wrapper around multiple reactive libraries, so I'm not always sure at what stages value-diffing is used (only some libraries do this by default; @ryansolid enabled diffing by default in https://github.com/solidjs/solid/releases/tag/v0.26.0 which might have drastically impacted these benchmarks?)

Would you be able to walk through what steps and checks Kairo makes to avoid work?

I understand that it resolves around computed5 not changing its value, because computed2 is always 0, but it can't possibly know it'll always be 0, since it depends on computed1, so it has to run every time to check, yes?... I think I'm confused about how much of the graph is marked as dirty each iteration of head.write(i), and in what order computeds are notified and re-executed. Are transitive dependencies (i.e head) passed up in Kairo? In the frameworks I've studied I'd see head "passed up" each time such that computed5 is notified/called directly by head, which in turn calls "down the tree" (which is great for conditional logic where you want to only execute necessary computeds but maybe not relevant in this code example).

Any insight and discussion would be helpful. Thanks!

Stabilize framework integrations

  • Angular
    • A scheduler is required to adapt zone-less applications
  • React
    • Although the concurrent features make it so painful to implement an integration (of reading external source) with ergonomics (have to write boilerplate hooks), it's almost solved (with de-opt).
  • Vue
    • Almost done, by hacking into ReactiveEffect. It's universal, that makes cell work anywhere native ref can work.
  • Svelte
    • Almost not a problem, since svelte supports object with .subscribe natively
  • Solid

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.