Giter VIP home page Giter VIP logo

Comments (8)

Drup avatar Drup commented on July 18, 2024

Can you motivate the change a little more ? Wouldn't it touch only the internal, not making a big change for the user ? Would it be more efficient ?

from eliom.

hhugo avatar hhugo commented on July 18, 2024

the difference with the current implementation is that it patches lists instead of updating the whole value.

Imaging having a live chat with 1000+ msgs. Using react with the current implementation would recompute every msgs at every insertion.

With reactive list, you only apply patches and in the end patch the dom (https://github.com/hhugo/reactiveList/blob/master/src/reactiveDomList.ml#L11)

  • It is more than an "internal" change.
  • more efficient : the efficiency is not the point but yes => you compute one element only at insertion

from eliom.

Drup avatar Drup commented on July 18, 2024

Ok, that's what I though, thanks.
And according to your description, efficiency is exactly the point. :p

Can we make this a not-to-breaking change and wait for 4.1 ?

from eliom.

hhugo avatar hhugo commented on July 18, 2024

as discussed with @balat, this will not be part of 4.0 and will wait 4.1 !
If you want to try to implement this without breaking the interface, please try. But as I said before, I think this change is about interfaces and not about performances.
The fact that it does not rebuild unneeded element is not only performances. It's about not touching dom that don't change (ie: keep your text selection, keep an onmousedown, ..)

from eliom.

Drup avatar Drup commented on July 18, 2024

Ok, I see your point more clearly now.

We should make it clear in the documentation that the R modules is WIP and will change a bit then.

from eliom.

hhugo avatar hhugo commented on July 18, 2024

This change will require an update to the tyxml interface to provide different wrappings (one for attribute, one for element list).
Also we might have an issue with plus / plus_concat (ie TABLE)
What will be the meaning of a reactive TABLE wrt the non-emptiness.

from eliom.

hhugo avatar hhugo commented on July 18, 2024

related work : "Higher-Order Reactive Programming with Incremental Lists"

from eliom.

hhugo avatar hhugo commented on July 18, 2024

merged

from eliom.

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.