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

fix(plugin-server): Set transpileOnly when importing piscina code in tests #9777

Merged
merged 1 commit into from
May 13, 2022

Conversation

macobo
Copy link
Contributor

@macobo macobo commented May 13, 2022

Requiring our ts code took ~15 seconds on each worker thread every test, which in turn blocks getting plugin schedules during server setup.

This change takes this down to 4.4s locally.

@macobo macobo requested a review from yakkomajuri May 13, 2022 09:27
@macobo macobo changed the title fix(plugin-server) Set transpileOnly when importing piscina code in tests fix(plugin-server): Set transpileOnly when importing piscina code in tests May 13, 2022
@macobo macobo requested a review from tiina303 May 13, 2022 09:48
…tests

Requiring our ts code took ~15 seconds on each worker thread every test.
This change takes this down to 4.4s locally
@macobo macobo force-pushed the speed-up-tests-plugin-server branch from 417d580 to 7dba785 Compare May 13, 2022 09:48
@macobo macobo marked this pull request as ready for review May 13, 2022 09:48
@yakkomajuri yakkomajuri merged commit b5349a7 into master May 13, 2022
@yakkomajuri yakkomajuri deleted the speed-up-tests-plugin-server branch May 13, 2022 10:59
fuziontech added a commit that referenced this pull request May 13, 2022
* master:
  fix: exclusion steps cannot be selected (#9762)
  feat(lemon-button): Support `status` for `primary` buttons (#9782)
  fix: healthcheck for kafka on plugin server (#9771)
  fix(billing): Update billing success message (#9739)
  fix(plugin-server): Set transpileOnly when importing piscina code in tests (#9777)
  fix(plugin-server): Remove unused kafka reset test code (#9779)
  fix: set kafka_skip_broken_messages on dead letter queue table (#9754)
  fix(plugin-server): remove dead code from worker.test.ts (#9776)
  refactor(plugin-server): Run ingestion only on worker threads (#9738)
  fix: Plugin-server tests with kafka need to have consumer stopped (#9774)
  chore(deps): Update posthog-js to 1.21.1 (#9773)
  chore(dep): upgrading rr-web (#9772)
  fix: ouroboros inputs (#9769)
macobo added a commit that referenced this pull request May 18, 2022
Every time we run jest tests, typescript is being compiled. This adds
~13-20s to _starting_ each test suite on my machine.

This change brings it down to 1s at the cost of only _transpiling_ the
code and not doing any typechecking.

The second overhead this fixes is for piscina: every worker thread
compiled its own code every time, speeding this up takes that from 4.4s
to under a second. See #9777 for
original context
macobo added a commit that referenced this pull request May 18, 2022
* feat(plugin-server): use swc for running jest tests

Every time we run jest tests, typescript is being compiled. This adds
~13-20s to _starting_ each test suite on my machine.

This change brings it down to 1s at the cost of only _transpiling_ the
code and not doing any typechecking.

The second overhead this fixes is for piscina: every worker thread
compiled its own code every time, speeding this up takes that from 4.4s
to under a second. See #9777 for
original context

* Re-add ts-jest
alexkim205 pushed a commit that referenced this pull request May 23, 2022
…tests (#9777)

Requiring our ts code took ~15 seconds on each worker thread every test.
This change takes this down to 4.4s locally
alexkim205 pushed a commit that referenced this pull request May 23, 2022
* feat(plugin-server): use swc for running jest tests

Every time we run jest tests, typescript is being compiled. This adds
~13-20s to _starting_ each test suite on my machine.

This change brings it down to 1s at the cost of only _transpiling_ the
code and not doing any typechecking.

The second overhead this fixes is for piscina: every worker thread
compiled its own code every time, speeding this up takes that from 4.4s
to under a second. See #9777 for
original context

* Re-add ts-jest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants