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

Defer loading log files till after page load #1437

Merged
merged 5 commits into from Mar 7, 2017
Merged

Conversation

@PtrTeixeira
Copy link
Contributor

@PtrTeixeira 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

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
Copy link
Member

@ssalinas ssalinas commented Feb 28, 2017

thanks @PtrTeixeira

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
Copy link
Member

@ssalinas 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
Copy link
Contributor Author

@PtrTeixeira 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 2 commits Mar 1, 2017
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
Copy link
Member

@ssalinas ssalinas commented Mar 3, 2017

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

@ssalinas
Copy link
Member

@ssalinas ssalinas commented Mar 7, 2017

👍

@ssalinas ssalinas merged commit 2edd9b2 into master Mar 7, 2017
1 check failed
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 removed hs_qa labels 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.