5 ms·
how much faster (snappier) is the app written using React 16 (numbers or stats anywhere?) and was it really worth it?
by orliesaurus 9y ago
how much faster (snappier) is the app written using React 16 (numbers or stats anywhere?) and was it really worth it?
- baddox 9y agoThe author hints that there probably aren’t significant performance improvements yet, but I’ve seen a spattering of tweets claiming to see fairly significantly real-world performance boosts. https://mobile.twitter.com/winkler1/status/911580798024912897?lang=en https://mobile.twitter.com/winkler1/status/91158079802491289...
- orliesaurus 9y agothanks, nicely spotted tweet!
- nikcub 9y agoThat benchmark needs more context because were I to guess i'd say they're using stream rendering[0][1] in React 16 I also agree with one of the comments in reply who linked to "How to win in web framework benchmarks"[2] Unlike, say, benchmarks for performing hash functions on graphics cards or frame rates on certain hardware the units of work being tested on web benchmarks very rarely reflect the units of work used in your own systems In performance and security critical components we write benchmark-*.{ts,js} tests and track performance of real-world components. At the moment in the mocha world there is no good way to keep a history of results, so we tend to copy+paste them as code comments (noticed this in a lot of projects) - but it wouldn't be difficult to write a storage backend here in sqlite or similar and store it in the same way coverage reports are If you're doing comparisons on modules you use - you can include them as devDependancies. This also forces you to abstract away your dependancies which is often a good thing. [0] https://reactjs.org/docs/react-dom-server.html#rendertonodestream https://reactjs.org/docs/react-dom-server.html#rendertonodes... [1] https://github.com/facebook/react/issues/6420 https://github.com/facebook/react/issues/6420 [2] https://medium.com/@localvoid/how-to-win-in-web-framework-benchmarks-8bc31af76ce7 https://medium.com/@localvoid/how-to-win-in-web-framework-be...
- baddox 9y agoIndeed, it’s not easy to come up with a repeatable benchmark from which broad meaningful conclusions can be made. But if a real-world React application gets faster when upgrading, I’m all for sharing that, and it can be a useful estimate if that application is somewhat similar to my own codebase.
- sergiotapia 9y agoI can speak to _significant_ performance improvements when upgrading to React 16. Like night and day performance with minimal code tweaking. (Basically add prop-types package and remove any references to React.proptypes)