Package updates & TS startup time optimizations #898
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found updating ts-node and ts-node-dev gives a nice performance boost to graphql's startup:
time yarn start
: 23.54s -> 10.15stime yarn run dev
: 20.68s -> 10.42stime yarn run test
: 24.63s -> 20.11s(Averaged over 3 runs, with a line of code added to
server.js
to make it quit after everything finished starting, so that the timings were consistent)I tried updating ts-jest and jest, but there is currently a significant performance regression, so I skipped this.
Hoping the same could happen for webapp, I also updated vue-cli, webpack, babel, etc. but the compilation time didn't really change. I kept the changes anyway, as updates are good.
Lastly, I optimized the CI a bit - skipping type checking on the
gen-binding
andgen-sql-schema
commands, and allowing CircleCI to cache thenode_modules
directories. Together these save ~1 minute in the generate-graphql-schema step.