ssorallen / react-play

Render React components in the Play Framework with JDK8's JavaScript engine
MIT License
214 stars 26 forks source link

Performance of React.js in Nashorn in comparison to the browser? #8

Closed kajmagnus closed 9 years ago

kajmagnus commented 9 years ago

Hi,

Have you done any performance tests? Do you know how fast is React.js server side in comparison to in the browser? (You don't happen to have any performance tips?)

I'm running React server side too (Java 8u60 & Play Framework) in my web app, and React + Nashorn is 10x slower than React + Chrome: in Chrome, React renders the markup for a large page in 0.3 seconds (with no pre-rendered HTML from the server, otherwise it's a bit faster), server side, it takes 3 seconds.

Best regards, KajMagnus

kajmagnus commented 9 years ago

Might be related to a Nashorn performance bug: https://github.com/winterbe/spring-react-example/issues/6, reportedly fixed in 8u66 (I found out when I asked here too: http://winterbe.com/posts/2015/02/16/isomorphic-react-webapps-on-the-jvm/#comment-2252809483 )