You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/en/blog/release/v21.1.0.md
+8-3
Original file line number
Diff line number
Diff line change
@@ -27,16 +27,21 @@ such as `.mjs` or `.cjs`, will opt out of detection.
27
27
28
28
Contributed by Geoffrey Booth in [#50096](https://github.com./nodejs/node/pull/50096).
29
29
30
+
### vm: fix V8 compilation cache support for vm.Script
31
+
32
+
Previously repeated compilation of the same source code using `vm.Script` stopped hitting the V8 compilation cache after v16.x when support for `importModuleDynamically` was added to `vm.Script`, resulting in a performance regression that blocked users (in particular Jest users) from upgrading from v16.x.
33
+
34
+
The recent fixes landed in v21.1.0 allow the compilation cache to be hit again for `vm.Script` when `--experimental-vm-modules` is not used even in the presence of the `importModuleDynamically` option, so that users affected by the performance regression can now upgrade. Ongoing work is also being done to enable compilation cache support for `vm.CompileFunction`.
35
+
36
+
Contributed by Joyee Cheung in https://github.com./nodejs/node/pull/50137
37
+
30
38
#### Other Notable Changes
31
39
32
40
-\[[`3729e33358`](https://github.com./nodejs/node/commit/3729e33358)] - **doc**: add H4ad to collaborators (Vinícius Lourenço) [#50217](https://github.com./nodejs/node/pull/50217)
-\[[`dda33c2bf1`](https://github.com./nodejs/node/commit/dda33c2bf1)] - **vm**: reject in importModuleDynamically without --experimental-vm-modules (Joyee Cheung) [#50137](https://github.com./nodejs/node/pull/50137)
38
-
-\[[`3999362c59`](https://github.com./nodejs/node/commit/3999362c59)] - **vm**: use internal versions of compileFunction and Script (Joyee Cheung) [#50137](https://github.com./nodejs/node/pull/50137)
0 commit comments