News for hackers. Stuff that matters.
Re:React Fiber Architecture by tootie on Sunday August 07, 2016 @06:18PM (#12244010)
Just built our first major react/redux site. Moderate complexity, I'd say. React runs pretty fast, but on page load we take 2.5s to compile all the JavaScript.
Re:React Fiber Architecture by cheapsteak on Sunday August 07, 2016 @06:51PM (#12244180)
Are you sure compilation is the bottleneck? 2.5s seems way too much by an order of magnitude.

Have you looked into compiling during your build step instead of at runtime?

Re:React Fiber Architecture by underwater on Monday August 08, 2016 @01:25AM (#12245654)
In a large application my rule of thumb is 1/3 compile, 1/3 React internals (which includes DOM updates) and 1/3 product code. 2.5 seconds is a lot, but not surprising if an application is being shipped as a multi-megabyte bundle.

Compiling as a build step doesn't get you very far when you are forced to ship source code to JS engines.

Re:React Fiber Architecture by cheapsteak on Monday August 08, 2016 @01:43AM (#12245702)
I guess I may be a bit confused on what he meant by compilation

Since JS is JIT compiled, I assumed perhaps he was delivering his scripts in raw JSX+ES6 and transpiling at runtime via babel's browser.js (as shown by react's Getting Started guide) [1].

If he meant time spent parsing the JS then I'd be a bit suspicious about the 2.5s both because of the extraordinary length and also I find it hard to believe someone who would know how to measure parse time would mistake the term with compilation.

[1]: https://facebook.github.io/react/docs/getting-started.html