Skip to content

Commit f6769d4

Browse files
committed
fix perf
1 parent 39c8656 commit f6769d4

File tree

2 files changed

+6
-0
lines changed
  • crates

2 files changed

+6
-0
lines changed

crates/rspack_binding_api/src/swc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ fn _transform(source: String, options: String) -> napi::Result<TransformOutput>
5555
let module_source_map_kind = _to_source_map_kind(options.source_maps.clone());
5656

5757
let task = || {
58+
let handle = tokio::runtime::Handle::current();
59+
let _guard = handle.enter();
60+
5861
compiler
5962
.transform(
6063
source,

crates/rspack_loader_swc/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ impl SwcLoader {
103103
let mut collected_ts_info = None;
104104

105105
let task = || {
106+
let handle = tokio::runtime::Handle::current();
107+
let _guard = handle.enter();
108+
106109
javascript_compiler.transform(
107110
source,
108111
Some(filename),

0 commit comments

Comments
 (0)