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

Defer loading log files till after page load #1437

Merged
merged 5 commits into from Mar 7, 2017

Conversation

Projects
None yet
2 participants
@PtrTeixeira
Contributor

PtrTeixeira commented Feb 28, 2017

Move the action of loading the log files from S3 from refresh, where
the rootComponent blocks page load until the Promise resolves, to
componentDidMount, where it doesn't block page load. This is intended
as a temporary fix, rather than a best-practice course of action.

/cc @ssalinas

Defer loading log files til after page load
Move the action of loading the log files from S3 from `refresh`, where
the `rootComponent` blocks page load until the Promise resolves, to
`componentDidMount`, where it doesn't block page load. This is intended
as a temporary fix, rather than a best-practice course of action.
@ssalinas

This comment has been minimized.

Show comment
Hide comment
Member

ssalinas commented Feb 28, 2017

thanks @PtrTeixeira

Dispatch but don't return log fetch promise
Moves the fetch request back into the `refresh` method, but don't return
it. This keeps the refresh code centralized, but will still prevent it
from blocking the page load.

@ssalinas ssalinas added the hs_staging label Feb 28, 2017

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Feb 28, 2017

Member

@PtrTeixeira seems I was incorrect about being able to do that. We can take another look at a more permanent solution for this tomorrow

Member

ssalinas commented Feb 28, 2017

@PtrTeixeira seems I was incorrect about being able to do that. We can take another look at a more permanent solution for this tomorrow

@PtrTeixeira

This comment has been minimized.

Show comment
Hide comment
@PtrTeixeira

PtrTeixeira Mar 1, 2017

Contributor

It might be worth just adding another parameter to rootComponent for 'These are things that I'd like loaded, but shouldn't block the page load'

Contributor

PtrTeixeira commented Mar 1, 2017

It might be worth just adding another parameter to rootComponent for 'These are things that I'd like loaded, but shouldn't block the page load'

PtrTeixeira added some commits Mar 1, 2017

Add additional hook into component lifecycle
Adds another hook for `rootComponent` to interact with the component
lifecycle. In particular, the `onLoad` function provides a hook that
will run during `componentDidMount`, in contrast to `refresh`, which
provides a hook into `componentWillMount`. The intended use case is for
kicking off actions which should be handled eventually, but which should
not prevent the page from loading. The issue with doing those in
`refresh` is that `rootComponent` will display a spinner until the
promise returned from `refresh` is entirely complete; there isn't a
mechanism for only having some requests block.

@PtrTeixeira PtrTeixeira added the hs_qa label Mar 3, 2017

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Mar 3, 2017

Member

Looks good, this should be good to go to hs_stable @PtrTeixeira

Member

ssalinas commented Mar 3, 2017

Looks good, this should be good to go to hs_stable @PtrTeixeira

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Mar 7, 2017

Member

👍

Member

ssalinas commented Mar 7, 2017

👍

@ssalinas ssalinas merged commit 2edd9b2 into master Mar 7, 2017

1 check failed

continuous-integration/travis-ci/push The Travis CI build could not complete due to an error
Details

@ssalinas ssalinas deleted the dont-block-for-logs branch Mar 7, 2017

@ssalinas ssalinas modified the milestone: 0.14.0 Mar 13, 2017

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