Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance after multiple file saves #38

Open
lougreenwood opened this issue May 21, 2019 · 2 comments
Open

Poor performance after multiple file saves #38

lougreenwood opened this issue May 21, 2019 · 2 comments

Comments

@lougreenwood
Copy link

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...

@lougreenwood lougreenwood changed the title poor performance after multiple file saves Poor performance after multiple file saves May 21, 2019
@ef4
Copy link
Owner

ef4 commented May 21, 2019

I would have thought that running with prember enabled in development is an unusual thing to do. What does it give you in dev over normal ember-cli-fastboot?

@lougreenwood
Copy link
Author

lougreenwood commented May 21, 2019

For this particular project, I have both the app and it's website in the same project.

The website routes are pre-rendered, but the app is rendered completely client side.

This is where the problems come - the app routes are not fastboot compatible. So for dev I run with Prember enabled & Fastboot disabled:

export PREMBER=TRUE
export FASTBOOT_DISABLED=TRUE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants