TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Million 3 – Optimizing compiler for React

97 pointsby aidenybover 1 year ago

16 comments

lukevpover 1 year ago
I met Aiden (the < 20 yo who started Million) a year or so ago. He presented about Million in front of a room full of 40+ grizzled JS devs. I don't personally see any reason to use Million JS, React is fast enough as it is if you memoize and use selectors correctly. Aiden said some similar things at the time (a solution in search of a problem, that got unexpectedly popular) but I gotta say, he's a hype man for sure. I wish him luck, I think if he made a more compelling library, it would be a rocket ship with his marketing. I do think he should take some hints from the other post regarding the deceptive benchmarks and make sure he can back up his marketing materials, but 14k stars on GitHub for something that (to me) seems pretty useless is truly bananas skill.
评论 #39259330 未加载
评论 #39238113 未加载
评论 #39247622 未加载
zackifyover 1 year ago
Or people could structure their react components efficiently and be fine as is.<p>I’m sure I’ll get a lot of downvotes for that.<p>But after 10 years of using react. Most performance issues were really just poor state management in the wrong locations and not the virtual dom holding it back.
评论 #39247182 未加载
agluszakover 1 year ago
&gt; Instead of traversing every node, Million uses a compiler to directly update dynamic nodes, resulting in O(1) time complexity.<p>This sounds very hand-wavy. What does it mean to &quot;use a compiler to directly update dynamic nodes&quot;?
评论 #39238084 未加载
Hrun0over 1 year ago
OP lied about benchmarks in the past:<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;javascript&#x2F;comments&#x2F;x2iwim&#x2F;askjs_millionjs_claim_of_11x_performance_increase&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;javascript&#x2F;comments&#x2F;x2iwim&#x2F;askjs_mi...</a>
评论 #39236484 未加载
评论 #39236984 未加载
评论 #39238251 未加载
698969over 1 year ago
Million&#x27;s optimizations are only relevant if you&#x27;re rendering a large number of identical stateless components (exactly like JS Framework Benchmark).<p>Real world applications are mostly deep trees of stateful components.
c-smileover 1 year ago
How does M3 stand with SvelteJS?<p>Seems like these are two conceptually similar things.<p>&gt; React traverses the virtual DOM tree to update the UI, resulting in O(n) time complexity.<p>That&#x27;s the worst case, on initial load. On most of UI changes nothing stops React to update only local portions of the tree - elements that have their state changed.<p>Educated guess: In Million and React.JS cases major bottleneck is inside browser re-layout mechanism, not on JS side I think.
评论 #39236987 未加载
RyanHamiltonover 1 year ago
I&#x27;ve built a real time updating app using react and I&#x27;m struggling to see the benefit here. For the very core parts I&#x27;m already avoiding the react overhead by using useref to maintain the same object. This reduces &quot;hydration &quot; and traversing to nil cost with no new concepts to learn. Why would I use million?
评论 #39236656 未加载
frflover 1 year ago
I haven&#x27;t used React in a while and never used SolidJS, but would SolidJS not basically be a optimizing compiler as well for &quot;React&quot;. Technically SolidJS is a separate framework and I don&#x27;t know if it&#x27;s a 100% drop in replacement like this make be.<p>Edit: My comment is probably not accurate. Please ignore what I said.
评论 #39235245 未加载
photon_colliderover 1 year ago
This looks really cool! It&#x27;s interesting that this compiler provides performance optimizations by looking for data diffs rather than diffs in the Virtual DOM. Is this intended to be an alternative to React Forget (still in development)?
ggregoireover 1 year ago
Never heard of this, sounds super cool! Gratz on the milestone!<p>Theoretically, could this be merged in the main React project or would this break something?
agluszakover 1 year ago
Aiden seems to have hopped on the AI hype train, too.<p><a href="https:&#x2F;&#x2F;million.dev&#x2F;ai">https:&#x2F;&#x2F;million.dev&#x2F;ai</a>
voatover 1 year ago
Ignore the haters. Million is a great project, and def provides a great solution to speeding up react.
tibbydudezaover 1 year ago
Interesting - tried it but it did not like me using decorators.
quickthrower2over 1 year ago
Anyone knows how this compares with Svelte’s approach?
gothinkover 1 year ago
I&#x27;m not a React dev, so I can&#x27;t comment on the project itself. Something I noticed on the blog post, though: The image at the top of the page is served uncompressed at a whopping 18.5MB (9751px * 6132px)! Seems a bit extreme for what amounts to a simple logo and some text.
评论 #39235995 未加载
评论 #39236644 未加载
评论 #39237858 未加载
评论 #39238091 未加载
评论 #39236963 未加载
评论 #39238107 未加载
评论 #39259295 未加载
评论 #39312062 未加载
spyke112over 1 year ago
Kudos to the team, but why on earth should i choose React when we’ve now reached a point where it needs an optimization compiler, seems silly to be honest.
评论 #39234717 未加载
评论 #39235538 未加载
评论 #39235231 未加载
评论 #39234750 未加载