mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -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. |
||
---|---|---|
.. | ||
compiler.rs | ||
dispatch_json.rs | ||
dispatch_minimal.rs | ||
errors.rs | ||
fetch.rs | ||
files.rs | ||
fs.rs | ||
io.rs | ||
metrics.rs | ||
mod.rs | ||
net.rs | ||
os.rs | ||
performance.rs | ||
permissions.rs | ||
process.rs | ||
random.rs | ||
repl.rs | ||
resources.rs | ||
timers.rs | ||
tls.rs | ||
workers.rs |