Giter VIP home page Giter VIP logo

dom-reconciler-bench's People

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

Watchers

 avatar  avatar  avatar  avatar

dom-reconciler-bench's Issues

Would it be ok for an implementation to bring it's own Store/Store methods?

I was working through this benchmark and I noticed something. The store which all the tests are based on is based on mutating plain javascript objects. While this is fully something one can do and it's great to see performance here for Imba, it is generally something you wouldn't due in many libraries as it's the least optimal way to handle change detection.

Immutable data structure allowing for referential comparison is super common for top down renderers like those found in VDOM libraries, and many direct DOM libraries. Similarly many libraries based on Mutable data structures usually involve specialized dependency tracking/subscription that doesn't work with POJO's. The Glimmer submission actually does each operation separate from the store as well so that it can also use it's own tracking mechanism. So it's actually doing more work than would normally be necessary. If anything Glimmer should be more performant than what we are seeing.

In both of these optimizations allow early exit conditions, whereas mutating POJO's forces a full deep diff which is generally the worst case scenario. A library could be written to optimize this scenario to only memoize closest to the DOM, DOMC (the current fastest library on the JS Framework Benchmark) works this way, but it's a scenario that is completely avoidable. And both other approaches are indistinguishably slower (2nd and 3rd in the same Benchmark).

So what I'm wondering is it possible for this Benchmark to support other change detection mechanisms? Would it be acceptable for an implementation bring it's own Store/Store Methods?

Add additional benchmark for optimized implementations

Imo, this is needed for perspective of what the existing benchmark is testing.

Could just be a tab at the top that navigates to a page that looks like the existing one, but uses all the idiomatic best practices for managing state

Why is Imba so much slower with increased number of rows?

Hi folks,

I hope it's OK that I leave this question as an issue.

As in the topic, why does performance goes down so much with the number of rows set to a large number (in hundreds)? Is this implementation missing some sort of optimization? I saw in the docs and articles that "we just render everything". Is that literally true?

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.