mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
d9ff4eccb5
Basically this does pre-processing of TypeScript files and gathers all the dependencies asynchronously. Only then after all the dependencies are gathered, does it do a compile, which at that point all the dependencies are cached in memory in the compiler, so with the exception of the hard coded assets, there are no ops during the compilation. Because op_fetch_source_files is now handled asynchronously in the runtime, we can eliminate the tokio_util::block_on() which was causing the increase in threads. Benchmarking on my machine has shown about a 5% improvement in speed when dealing with compiling TypeScript. Still a long way to go, but an improvement. In theory the module name resolution and the fetching of the source files could be broken out as two different ops. This would prevent situations of sending the full source file all the time when actually the module is the same module referenced by multiple modules, but that could be done subsequently to this.
5 lines
302 B
Text
5 lines
302 B
Text
[WILDCARD]error: Uncaught NotFound: Cannot resolve module "[WILDCARD]/bad-module.ts"
|
|
[WILDCARD]dispatch_json.ts:[WILDCARD]
|
|
at DenoError ([WILDCARD]errors.ts:[WILDCARD])
|
|
at unwrapResponse ([WILDCARD]dispatch_json.ts:[WILDCARD])
|
|
at sendAsync[WILDCARD] ([WILDCARD]dispatch_json.ts:[WILDCARD])
|