3 ms·
A few points - 1. A direct comparison to Facebook's react Github page may not be fair. Their page is 10 times heavier than the blog page - of course its going
by inian 11y ago
A few points -
1. A direct comparison to Facebook's react Github page may not be fair. Their page is 10 times heavier than the blog page - of course its going to be faster.
2. Actually the Facebook's React page is not that well designed when it comes to performance. I see a lot of scripts included in the FB react page blocking rendering (codemirror.js, etc) even in pages where they are not used. If those are removed, the time to first render should drop down by a lot.
3. I feel a more apt comparison would have be comparing to a purely static page like a blog hosted on Github. Not a page which actually includes a live code editor!
4. No one says the page loads in the DOMContentLoaded time. It is mostly a useless metric when it comes to performance measurement.
- vjeux 11y agoFor reference, we haven't spent any time trying to optimize the react website for perf. Also that front page really needs to be rethought, we haven't updated it since launch...
- spicyj 11y agoI'll add: the React site uses the (larger and slower) development build of React because it can be useful to people visiting the site. Ordinarily you would use the prod build. Not to mention the lack of script bundling and inefficient (blocking) loading. Just hasn't been a priority for us.
- inian 11y agoOh thats why the dev build of React was there in the page. Makes sense!
- Touche 11y ago> For reference, we haven't spent any time trying to optimize the react website for perf. That's probably true of every slow site on the web. Part of the purpose of AMP is that it forces your site to be fast. Of course you can optimize a regular HTML page and make it faster, but you can't pass AMP validation with a slow site.
- ageitgey 11y agoI randomly picked the React website as an example github-hosted page to compare with (it was one of the first google results for github-hosted pages). I definitely didn't mean to pick on you all in particular! I'm not suggesting you should have spent a bunch of dev time making the landing page for a developer tool really fast on mobile devices (and React is a great tool!). I updated my README file to compare page load speed with the Jekyll homepage too since it's a closer analog. But comparing to a random page that wasn't too optimized was sort of the point - most of the time, speed isn't the priority and that can make a big real-world difference for mobile users.
- Touche 11y ago> 1. A direct comparison to Facebook's react Github page may not be fair. Their page is 10 times heavier than the blog page - of course its going to be faster. Isn't the point of AMP not to develop heavy sites for static content?
- dangoor 11y agoSure, but the React homepage isn't static content... it has a code editor on it so that you can try out React right there on the page. That seems like a perfectly reasonable thing to want on the homepage of a JS library.
- justlsice 11y agogood points