somebee / dom-reconciler-bench Goto Github PK
View Code? Open in Web Editor NEWA simplified benchmark measuring vdom performance
A simplified benchmark measuring vdom performance
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?
Could you please add svelte 3 and angular 9 for benchmark along with React and Vue?
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
I would like to see the client.js implementation. But looks like the file is minified.
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?
Both the "build" and "watch" commands failed for me on a fresh install until I ran:
yarn add webpack webpack-cli -D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.