Skip to content

Server Side Rendering Optimization #1035

Closed
@shaundr

Description

@shaundr

Steps to reproduce

  1. git clone https://github.com/shaundr/react_ssr
  2. cd react_ssr && bundle && yarn && bundle exec rails s
  3. open localhost:3000

Expected behavior

Timely server side rendering, perhaps parallelized?

Actual behavior

~140ms per HelloWorld example
Screen Shot 2019-10-11 at 10 22 45 AM

System configuration

Sprockets or Webpacker version: 4.0.7
React-Rails version: 2.6.0
Rails version: 5.1.7
Ruby version: 2.6.1p33


I've been hoping to SSR some of an application, however it appears to be too slow. I'm sprinkling React into the views with the react_component helper, which can result in quite a few components mounting. It looks like React-Rails renders them serially via ExecJS. Has anyone looked in to batching or parallelization?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions