Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Performance improvement: Fetch graph and plotly in parallel instead of sequentially #725

Merged
merged 3 commits into from
Dec 19, 2019

Conversation

Marc-Andre-Rivet
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet commented Dec 19, 2019

Updates the graph's async resources fetching to be done in parallel instead of sequentially. Reducing start to finish fetching time slightly.

const RealPlotlyGraph = asyncDecorator(PlotlyGraph, () => plotly().then(graph));
const RealPlotlyGraph = asyncDecorator(PlotlyGraph, () =>
Promise.all([plotly(), graph()]).then(([, graph]) => graph)
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parallelize requests

@Marc-Andre-Rivet Marc-Andre-Rivet marked this pull request as ready for review December 19, 2019 15:23
@Marc-Andre-Rivet Marc-Andre-Rivet assigned rpkyle and unassigned rpkyle Dec 19, 2019
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever! 💃

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 4dc909f into dev Dec 19, 2019
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the tweak-async-resource-fetching branch December 19, 2019 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants