Skip to content

Commit

Permalink
Mention more details about the JS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Mar 5, 2021
1 parent bc9c487 commit e02862f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release notes/v0.31.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The `http.setResponseCallback()` is meant to allow arbitrary JS functions to pro
## Other enhancements and UX improvements

- JS: Because of the awesome improvements to [goja](https://github.com/dop251/goja), the JS runtime k6 uses, it's no longer necessary for k6 to load [core.js](https://github.com/zloirock/core-js) to polyfill missing JS features when using the default [`--compatibility-mode=extended`](https://k6.io/docs/using-k6/javascript-compatibility-mode). So in v0.31.0 core.js has been dropped entirely, yielding some significant CPU and memory usage improvements. The actual numbers will depend on the use case, but for simple tests users can expect a memory drop of about 2MB per VU (from ~2.7MB to ~600KB), and a slight CPU decrease of about 5-10%. For more complex tests with a lot of JS code this benefit won't be as pronounced. Another benefit of this change is that initializing VUs and starting a test is substantially faster than before! ([#1824](https://github.com/loadimpact/k6/pull/1824))
- JS: Also because of goja improvements, some Babel plugins were disabled which should have minor performance benefits as well. ([#1822](https://github.com/loadimpact/k6/pull/1822))
- JS: Also because of goja improvements, some unused Babel plugins were disabled which should have minor performance benefits as well. ([#1822](https://github.com/loadimpact/k6/pull/1822))
- JS: Expanded `ArrayBuffer` support in most internal modules, so now you can pass `ArrayBuffer` to `http.file()`, in `k6/encoding` and `k6/crypto` functions. This makes working with binary files more efficient as it doesn't require string translations. In upcoming versions we plan to expand this to the WebSocket module, as well as make some potentially breaking changes for APIs that currently return an array of integers or string (see the details in the Breaking Changes announcement below). ([#1800](https://github.com/loadimpact/k6/pull/1800))
- The Docker image base was updated to Alpine 3.13. Thanks @andriisoldatenko! ([#1821](https://github.com/loadimpact/k6/pull/1821))
- The Debian package now includes `ca-certificates` as a dependency. Thanks @Bablzz! ([#1854](https://github.com/loadimpact/k6/pull/1854))
Expand All @@ -73,7 +73,7 @@ The `http.setResponseCallback()` is meant to allow arbitrary JS functions to pro

## Breaking changes

- JS: While we don't expect the core.js removal and Babel changes to impact the vast majority of users, those were substantial changes in how k6 interprets JS and a minority of users might experience issues with their tests. Please report any unexpected JavaScript errors by creating a GitHub issue.
- JS: While we don't expect the core.js removal and Babel changes to impact the vast majority of users, those were substantial changes in how k6 interprets JS and a minority of users might experience issues with their tests. Please report any unexpected JavaScript errors by creating a GitHub issue. In particular `Promise` is now `undefined`, and some unused Babel plugins like `transform-es2015-for-of` and `transform-regenerator` were also removed. This means that some workarounds like the ones mentioned [here](https://github.com/loadimpact/k6/issues/779#issuecomment-674311032) and [here](https://stackoverflow.com/a/65849645/96213) also won't work as is and will need additional polyfills and plugins to work properly.

The following are not breaking changes in this release, but we'd like to announce them so users can prepare for upcoming releases.

Expand Down

0 comments on commit e02862f

Please sign in to comment.