Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

perf(fragment): parallelized content and bundle HTTP requests #73

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

semonte
Copy link
Contributor

@semonte semonte commented Mar 10, 2017

affects: tessellate-fragment

Fetch bundle and content in parallel, they have no dependencies to each other.

ISSUES CLOSED: #69

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 79.126% when pulling 34ebc0c on parallel-loading into 68e0a19 on master.

const bundleIndex = 0;
const contentIndex = 1;
const { bundle, props } = promises[bundleIndex];
const content = promises[contentIndex];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use destructuring here to make the content more concise:

const [bundle, content] = await Promise.all([...])
// or
const [{ bundle, props }, content] = await Promise.all([...])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, much cleaner that way. I updated the code.

affects: tessellate-fragment

Fetch bundle and content in parallel, they have no dependencies to each other.

ISSUES CLOSED: #69
@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 77.515% when pulling 89ba62e on parallel-loading into 02991f8 on master.

@mfellner mfellner merged commit d877188 into master Mar 14, 2017
@mfellner mfellner deleted the parallel-loading branch March 14, 2017 12:57
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.

None yet

3 participants