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

Parallelizes the build script across multiple processes #15716

Merged
merged 2 commits into from
May 29, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented May 22, 2019

Based on #15757 and #15758

Parallelizes the build script across multiple processes.

Screen Shot 2019-05-28 at 6 45 26 PM

(Our CircleCI plan supports up to 300 parallel processes (!!!) per job, but there's no point making the build job faster than the test job, so I capped it at 20.)

To do this, I needed to change how we generate the bundle size JSON file. I changed the build script to generate a separate size file per build. A downstream CI job consolidates them into a single bundle-sizes.json that contains the combined size information for every build.

@acdlite acdlite force-pushed the parallelize-build-script-in-ci branch from 2c9a37a to 9495d5d Compare May 22, 2019 23:57
@sizebot
Copy link

sizebot commented May 23, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@acdlite
Copy link
Collaborator Author

acdlite commented May 23, 2019

Error code extraction is another blocker to parallelizing the build script. Don't feel like dealing with that now. I'll pick this task up some other time, not super crucial.

@acdlite acdlite force-pushed the parallelize-build-script-in-ci branch 2 times, most recently from 65251b8 to 572c847 Compare May 29, 2019 01:44
@acdlite acdlite changed the title [WIP] Write size info to separate file per bundle Write size info to separate file per bundle May 29, 2019
@acdlite acdlite changed the title Write size info to separate file per bundle Parallelizes the build script across multiple processes May 29, 2019
@acdlite acdlite marked this pull request as ready for review May 29, 2019 01:59
acdlite added 2 commits May 29, 2019 14:21
`bundle-sizes.json` contains the combined size information for every
build. This makes it easier to store and process, but it prevents us
from parallelizing the build script, because each process would need to
write to the same file.

So I've updated the Rollup script to output individual files per build.
A downstream CI job consolidates them into a single file.

I have not parallelized the Rollup script yet. I'll do that next.
Uses CircleCI's `parallelism` config option to spin up multiple build
processes.
@acdlite acdlite force-pushed the parallelize-build-script-in-ci branch 2 times, most recently from 442c887 to 84e7c0c Compare May 29, 2019 21:30
@acdlite acdlite merged commit 1cc3bba into facebook:master May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants