Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(preboot): add preboot functionality & fix aspnetcore-engine #401

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

Merged
MarkPieszak merged 1 commit into master from howto/preboot
Sep 5, 2017

Conversation

@MarkPieszak
Copy link
Member

@MarkPieszak MarkPieszak commented Sep 5, 2017

🎁 🎁
Added functionality to make sure (the temporary) aspnetcore-engine grabs scripts from the head, since preboot for example puts its code there to make its magic work.

Now we have preboot working as it should 👍

davidsekar reacted with hooray emoji
Copy link

MaklaCof commented Sep 6, 2017

Am I wrong or preboot is something used only with SSR. I am not sure if I should merge this commit with my project, which does not use SSR.

Copy link
Member Author

It's only with SSR yes, you wouldn't need it. It's to fill the gap between SSR and CSR in terms of user actions/input.

Copy link
Contributor

peterdobson commented Sep 13, 2017
edited
Loading

Has anyone noticed performance degradation in server response times when implementing these changes?

In my case up from a norm of 414 ms to 4.3 s. It's back to normal again after commenting out the changes and republishing.

image

Copy link
Member Author

Wow I haven't noticed that, but that's quite strange that it would slow it down! It's just a little script in the HTML. Hmm I'll have to look into this one! @peterdobson let me know if you discover anything else with this!

Copy link
Contributor

Sorry @MarkPieszak , I've concluded that something else is causing my server performance degradation. I'd incorrectly assumed it was related to the preboot changes because that's all I changed before seeing the response times shoot up and it went down again when I commented out the changes. The performance issue has just happened again (without the preboot stuff) so there must be something random going on that's causing it. Apologies for the false alarm.

Copy link
Member Author

Oh good I brought it up with everyone and they hadn't seen it, didn't have a chance to look into it yet so no harm no follow 👍

Take care

Copy link

naveedahmed1 commented Sep 29, 2017
edited
Loading

@peterdobson I am also facing random increase in response time. On a live app its taking about 1-3 sec for server rendered pages. @MarkPieszak can you please share some tips and best practices on optimization of initial response time.

It seems that Angular expects to construct a new app platform instance to serve each request. Which means that the bootstrap process is performed for each server rendered request. Is it possible to have some sort of cache so that the bootstrap is performed only for the first request.

I also come across the below react-ssr probably addressing same issue:

https://github.com/walmartlabs/react-ssr-optimization

Found something related to angular:

https://github.com/clbond/angular-ssr

Copy link
Member Author

When a request is made (in development) it looks to make sure that it is AoT'd, if not it compiles it, caches that, and then starts the serialization process. Further hits will use the cached AoT verison, this might be the slow time you're seeing occassionally.

Remember that the Development version doesn't matter much since there's a lot going on there that won't be in Prod.

As for render times, make sure your API responses aren't taking too long. It waits for everything before stabilizing and rendering. So if you have an API call that takes 3 seconds, it will slow down your rendering that much.

If you have a setTimeout for 1 second, it'll wait for that before rendering as well.

Make sure you look into all of these things that might be slowing down SSR performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /