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

[bootstrap] Build TS refs in parallel #90529

Closed
wants to merge 1 commit into from

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Feb 5, 2021

Results in a small (~7%) reduction in the build time. However, it does mean that projects referenced outside of x-pack might be doing twice the work at the expense of build time.

I first began by combining both tsconfig.refs.json to see if there would be an improvement in the build time. However, that didn't make a measurable difference.

Results in a small (~7%) reduction in the build time. However, it does mean that projects referenced outside of x-pack might be doing half the work at the expense of build time.

I first began by combining both tsconfig.refs.json to see if there would be an improvement in the build time. However, that didn't make a measurable difference.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley tylersmalley added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.12.0 labels Feb 5, 2021
@tylersmalley tylersmalley requested a review from a team as a code owner February 5, 2021 22:33
@spalger
Copy link
Contributor

spalger commented Feb 5, 2021

I'm a little worried about race conditions between the projects in the default config and their similar references from xpack, if the build for src/core is running in both process at the same time for instance do we know that TS will handle it correctly? Do we know that TS doesn't mess with the output files from one process or the other?

@tylersmalley tylersmalley requested a review from mshustov February 5, 2021 22:49
@tylersmalley
Copy link
Contributor Author

@spalger, I am not sure. @restrry, do you know?

@spalger
Copy link
Contributor

spalger commented Feb 5, 2021

I'm seeing a larger and exciting 45 second improvement when running this branch, tested with

find src x-pack packages -name '*.tsbuildinfo' | xargs rm && yarn kbn run kbn:bootstrap -i kibana

With four runs on both branches I got average times of 276s on master and 231s on this branch, which is an awesome little speed-up.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mshustov
Copy link
Contributor

mshustov commented Feb 6, 2021

yes, I removed parallel builds in #79438
I'd suggest merging both tsconfig.refs.json in a single file instead.

@tylersmalley
Copy link
Contributor Author

Closing in favor of #90537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants