mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
perf: pass transpiled module to deno_core as known string (#26555)
This commit is contained in:
parent
d92d2fe9b0
commit
f0f476e584
5 changed files with 43 additions and 50 deletions
|
@ -541,7 +541,8 @@ impl<TGraphContainer: ModuleGraphContainer>
|
|||
self.parsed_source_cache.free(specifier);
|
||||
|
||||
Ok(Some(ModuleCodeStringSource {
|
||||
code: ModuleSourceCode::Bytes(transpile_result),
|
||||
// note: it's faster to provide a string if we know it's a string
|
||||
code: ModuleSourceCode::String(transpile_result.into()),
|
||||
found_url: specifier.clone(),
|
||||
media_type,
|
||||
}))
|
||||
|
@ -571,7 +572,8 @@ impl<TGraphContainer: ModuleGraphContainer>
|
|||
self.parsed_source_cache.free(specifier);
|
||||
|
||||
Ok(Some(ModuleCodeStringSource {
|
||||
code: ModuleSourceCode::Bytes(transpile_result),
|
||||
// note: it's faster to provide a string if we know it's a string
|
||||
code: ModuleSourceCode::String(transpile_result.into()),
|
||||
found_url: specifier.clone(),
|
||||
media_type,
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue