Files
node/lib
Joyee Cheung 4a5d2c7538 module: integrate TypeScript into compile cache
This integrates TypeScript into the compile cache by caching
the transpilation (either type-stripping or transforming) output
in addition to the V8 code cache that's generated from the
transpilation output.

Locally this speeds up loading with type stripping of
`benchmark/fixtures/strip-types-benchmark.ts` by ~65% and
loading with type transforms of
`fixtures/transform-types-benchmark.ts` by ~128%.

When comparing loading .ts and loading pre-transpiled .js on-disk
with the compile cache enabled, previously .ts loaded 46% slower
with type-stripping and 66% slower with transforms compared to
loading .js files directly.
After this patch, .ts loads 12% slower with type-stripping and
22% slower with transforms compared to .js.

(Note that the numbers are based on microbenchmark fixtures and
do not necessarily represent real-world workloads, though with
bigger real-world files, the speed up should be more significant).

PR-URL: https://github.com/nodejs/node/pull/56629
Fixes: https://github.com/nodejs/node/issues/54741
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-25 02:30:27 +00:00
..
2024-09-24 19:48:15 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2024-12-15 14:19:27 +00:00
2024-10-17 13:18:28 +00:00
2024-07-08 15:55:43 +00:00
2024-12-06 04:36:24 +00:00
2024-10-09 06:42:16 +00:00
2024-10-09 06:42:16 +00:00
2025-01-04 18:30:04 +00:00
2024-10-09 06:42:16 +00:00
2024-07-07 00:56:04 +00:00
2024-12-10 12:18:18 +00:00