You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
More experiments are needed but if you check out this repo: https://github.com/catmando/HyperAQ
and go the prerendering-on branch you will see the problem.
The code is fetching about 70 records, and for each record is displaying 4 pieces of data in a table.
This takes 35 seconds on my box, this is compared to 1 second to fetch and process the data if done on the client.
Some experiments show that for fetching 1 piece of data (instead of 4) it only takes 3 seconds to render the page. Then if you get two fields from the same records it now takes 6 seconds, then if you get 3 pieces its up to 12, and finally the fourth piece (which is an attribute from a belongs_to relationship) takes 35 seconds. It seems like each additional piece of data is basically doubling the time.
I suspect the caching mechanism that keeps track of all the data fetched during pre-rerendering (which is needed so we can dump it the client and instantly rerender without re-fetching) is sub-optimal.
I also wonder if that caching mechanism got moved to the client (in the V8 engine) instead of the server.