Skip to content

Poor performance after multiple file saves #38

@lougreenwood

Description

@lougreenwood

In an app where there are many slow-loading pages to pre-render (in my case because they have APIs), if many project files are saved in quick succession, then the speed of a pre-render begins to severely degrade.

For me, this is compounded because I use Prember Crawler, so each of these slow-loading pages is visited twice - first by the crawler, then to pre-render.

I've also noticed that after a while the speed appears to improve again.

I suspect that what's happening is that for each build which is triggered by a file change, there is a build being forked off - so there can be N concurrent builds occurring for N multiple files which are saved in less than the time it takes for 1N build to complete.

In my case, I notice this when a pre-render pass has completed, but pages are not being served - I then usually see another pre-render pass come through on the console (even if no files saved) and serving starts again.

I'm not exactly sure what the issue might be, but I wonder if it's simply that Prember needs to kill all current pre-render jobs when a file is saved.

Any advice or pointers would be great - I'm happy to look into a PR if I can figure out what's going on...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions