5 ms·
Interesting that they don't compare it to preact: https://github.com/developit/preact https://github.com/developit/preact
by swrobel 10y ago
Interesting that they don't compare it to preact: https://github.com/developit/preact https://github.com/developit/preact
- t1amat 10y agoI thought the same. Their targets are Inferno and Preact.
- deleted 10y ago[deleted]
- rtpg 10y agoreading that, it seems pretty good. Are there performance costs to its diffing against the "real" DOM? 3kb for "React" is pretttttty tempting
- Etheryte 10y agoForget about file size, 40kb vs 8kb doesn't really matter in the modern era. If anything, using an obscure library may cost you more because it's less likely to be a CDN cache hit for the user.
- rtpg 10y agowe package our JS into one bundle, so just one CDN to hit (ours). Another thing is that even if you're at 40kb gzipped, that's still at least 20ms for parsing JS. When you're trying to improve performance, chopping out 30kb is nice
- Touche 10y ago40kb is 40% of your budget if targeting mobile.
- simonw 10y agoStart testing on a mid range Android device on 3G and tell me you still believe that. On mobile it's not just the file transfer that takes time: it's the JavaScript parsing and execution (on a single core) that hurts too. iPhones are massively faster than Android (especially cheaper Androids) at this, so many developers don't realize how much performance cost there is for a growing majority of their users. Given how many different versions there are of popular libraries I'm personally skeptical that CDNs give you much of a chance if the asset being preloaded from another site. I'd love to see real numbers on this though.
- Kiro 10y agoI build games where the player is supposed to play for hours. Am I wrong thinking that file size matters less for me? It adds 1% to the loading screen.
- rtpg 10y agoYeah for games it's not much of an issue. It becomes more of an issue if you are doing a "business" app, where there's a lot of moving between pages and a lot of eventual page refreshes.
- developit 10y agoIf you're loading libraries individually off a shared CDN, performance must not be much of a concern :P
- nobleach 10y agoYou mean, in America... in a metropolitan area.... with a nice newer device... with an unlimited data plan. A 40kb vs 8kb savings can mean quite a bit to those in other conditions.
- bjacobel 10y agoPreact doesn't offer a full synthetic events system so handling e.g. touch events cross-browser may cause you a little more headache than it would in React. But I'm currently using Preact (server-rendered) for my personal site and loving the speed and byte size.
- developit 10y agoFWIW, there is actually no code in React to normalize touch events between browsers. For touch events react and preact are basically the same (aside from React creating a lot of pooled objects for their synthetic event system, and preact not using delegation).
- garysieling 10y agoI switched from React to react-lite for https://www.findlectures.com https://www.findlectures.com and it has worked great (haven't compared to Preact yet)