-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Script optimization of APM-specific tsconfig #49868
Conversation
💚 Build Succeeded
|
Looks great to me! I wonder if there's a benchmark we can run to compare the performance. |
You can trace the logs from
vs
|
Maybe it’s just me but can you elaborate on the |
Oh, it looks like Can you then document the scripts in the readme (and PR description), and how they should be invoked? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Haven't played around with it much but I think you can just merge it in, and then we can take it from there.
The optimization breaks the bootstrapping process (which uses |
0c4b867
to
a5e632c
Compare
💚 Build Succeeded
|
a5e632c
to
998b5af
Compare
💚 Build Succeeded
|
ba71a99
to
03753ce
Compare
💔 Build Failed
|
03753ce
to
b093695
Compare
b093695
to
42287ea
Compare
💔 Build Failed
|
💚 Build Succeeded |
## Summary This adds an optimization script very copied and slightly modified from: * #49868 Usage: Run this to do an dev tsconfig optimization: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Run this to undo the optimization: ```ts node x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig ``` Testing and what this does: Run this: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Then run your start-test-all or at least your linter, typescript check, and jest tests to make sure they all operate as expected. Restart your IDE and ensure everything works as expected. Run `git status` and ensure it looks like no new files want to be checked in. Open up your: ```ts kibana/x-pack/tsconfig.json ``` And notice it is now changed when optimization has run to use a smaller set of includes. Open up your: ```ts kibana/tsconfig.json ``` And notice it is now changed when optimization is run to use a smaller set of includes.
## Summary This adds an optimization script very copied and slightly modified from: * elastic#49868 Usage: Run this to do an dev tsconfig optimization: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Run this to undo the optimization: ```ts node x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig ``` Testing and what this does: Run this: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Then run your start-test-all or at least your linter, typescript check, and jest tests to make sure they all operate as expected. Restart your IDE and ensure everything works as expected. Run `git status` and ensure it looks like no new files want to be checked in. Open up your: ```ts kibana/x-pack/tsconfig.json ``` And notice it is now changed when optimization has run to use a smaller set of includes. Open up your: ```ts kibana/tsconfig.json ``` And notice it is now changed when optimization is run to use a smaller set of includes.
) ## Summary This adds an optimization script very copied and slightly modified from: * #49868 Usage: Run this to do an dev tsconfig optimization: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Run this to undo the optimization: ```ts node x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig ``` Testing and what this does: Run this: ```ts node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig ``` Then run your start-test-all or at least your linter, typescript check, and jest tests to make sure they all operate as expected. Restart your IDE and ensure everything works as expected. Run `git status` and ensure it looks like no new files want to be checked in. Open up your: ```ts kibana/x-pack/tsconfig.json ``` And notice it is now changed when optimization has run to use a smaller set of includes. Open up your: ```ts kibana/tsconfig.json ``` And notice it is now changed when optimization is run to use a smaller set of includes.
Third time's the charm. Previous attempts:
This attempt adds two scripts in
apm/scripts
, that either create a tsconfig.json optimized for APM, or undo the changes in the optimization. Here's what the optimization process is like:tsconfig.json
file inx-pack/legacy/plugins/apm
tsconfig.json
s toapm.tsconfig.json
so these projecst are not bootstrapped by VS Code when a file from those projects is encountered.--skip-worktree
for thosetsconfig.json
s to prevent any changes to these files (including deleting them) to show up in the git staging area.