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

[Experimental Bundler]: Implement parallel request limits #7863

Closed
wants to merge 28 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1c30b0a
implement parallel request limits
gorakong Mar 24, 2022
f8a8e65
cleanup
gorakong Mar 24, 2022
a6f3065
Merge branch 'v2' of github.com:parcel-bundler/parcel into parallel-r…
gorakong Mar 28, 2022
892edd3
create all shared bundles first then remove later
gorakong Mar 29, 2022
4e04010
Merge branch 'v2' of github.com:parcel-bundler/parcel into parallel-r…
gorakong Apr 5, 2022
c09957e
Merge branch 'v2' of github.com:parcel-bundler/parcel into parallel-r…
gorakong Apr 28, 2022
7faa3d7
remove asset references for deleted bundles + minor fixes
gorakong May 2, 2022
5f734f6
Merge branch 'v2' of github.com:parcel-bundler/parcel into parallel-r…
gorakong May 3, 2022
1ca53e0
Merge branch 'v2' into parallel-request-limit
gorakong May 3, 2022
8091e67
Merge branch 'v2' into parallel-request-limit
gorakong May 3, 2022
e289ef5
Merge branch 'v2' into parallel-request-limit
May 4, 2022
4e22979
Merge branch 'v2' into parallel-request-limit
gorakong May 6, 2022
7fe7cac
Merge branch 'v2' into parallel-request-limit
gorakong May 9, 2022
ca162b2
Merge branch 'v2' into parallel-request-limit
May 16, 2022
b8060e9
revise method of getting shared bundles from bundlegroup + integratio…
gorakong Jun 2, 2022
e251bec
Merge branch 'v2' into parallel-request-limit
gorakong Jun 2, 2022
45c6b09
deep equal
gorakong Jun 2, 2022
209dc21
Merge branch 'v2' of https://github.com/parcel-bundler/parcel into pa…
gorakong Jun 15, 2022
c5eab76
fix bugs with missing node/edges
gorakong Jun 24, 2022
c17c539
Merge branch 'v2' into parallel-request-limit
gorakong Jun 24, 2022
8d942fc
remove logs
gorakong Jun 24, 2022
7b6c959
Merge branch 'parallel-request-limit' of https://github.com/parcel-bu…
gorakong Jun 24, 2022
466e51b
change config to default in validateSchema
gorakong Jun 27, 2022
df9a74f
Merge branch 'v2' of https://github.com/parcel-bundler/parcel into pa…
gorakong Jun 27, 2022
2bc4c1c
Merge branch 'v2' of https://github.com/parcel-bundler/parcel into pa…
gorakong Jul 5, 2022
8abca30
include all referenced bundles in bundleGroups
gorakong Jul 5, 2022
fdbe58e
update bundle.sourceBundle when removing shared bundle
gorakong Jul 5, 2022
a2e15fc
match limit to num shared bundles in group
gorakong Jul 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/bundlers/experimental/src/ExperimentalBundler.js
Expand Up @@ -788,6 +788,24 @@ function createIdealGraph(
let sourceBundles = reachable.map(a => nullthrows(bundles.get(a.id)));
let key = reachable.map(a => a.id).join(',');
let bundleId = bundles.get(key);

sourceBundles.filter(sourceBundleId => {
gorakong marked this conversation as resolved.
Show resolved Hide resolved
if (bundleId !== sourceBundleId) {
let sourceBundle = nullthrows(bundleGraph.getNode(sourceBundleId));
invariant(sourceBundle !== 'root');
let bundleGroupIds = bundleGraph
.getNodeIdsConnectedTo(sourceBundleId)
.filter(n => bundleGraph.getNode(n) !== 'root');
// Check that all bundle groups the source bundle belongs to
// are within the parallel request limit
return bundleGroupIds.every(
groupId =>
bundleGraph.getNodeIdsConnectedFrom(groupId).length <
config.maxParallelRequests,
);
}
});

let bundle;
if (bundleId == null) {
let firstSourceBundle = nullthrows(
Expand Down