Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

during prerendering hypermodel has gotten very slow #3

@catmando

Description

@catmando

This is a fairly recent change I think.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions