3 ms·
NODE_ENV=production definitely wasn't set based on some basic testing I did (that's my PR there), which accounts for the atrocious performance. Also, the React
by anatoli 9y ago
NODE_ENV=production definitely wasn't set based on some basic testing I did (that's my PR there), which accounts for the atrocious performance.
Also, the React component is created on each request instead of just being created once. Unless one's goal is to specifically colour the perception of React, I don't understand that decision alongside the code for Pug which precompiles the template a single time.
(Also declaring the map function outside the component and not creating a closure makes for a tiny extra boost.)
It's disappointing to see that the article took off to this extent given how misleading and inaccurate it is.
- zghst 9y agoIt’s common in the dev (esp. JavaScript) community. The wild rush to be first to discover or disagree for karma points on the internet.
- velmu 9y agoHello Anatoli. Thank you for this. It was clearly an oversight on my part, not intentional to make React look bad. I have added a note on the article and will run the tests with the correct settings and your PR with further optimisation.
- jeswin 9y agoThen you should withdraw the article until you get real numbers. This utterly misleading data (as of now) is going to be picked up by search engines and other blogs. Add: on a positive note, this aspect of React is worth benchmarking. Thank you for that.
- anatoli 9y agoNo worries. The reader has as much responsibility to question the material they're consuming :)