Skip to content

Commit

Permalink
build(es/plugin): Fix Wasm build, really (#6180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Oct 17, 2022
1 parent 995c701 commit ea4ae3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/swc_plugin_runner/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ use swc_common::{
collections::AHashMap,
sync::{Lazy, OnceCell},
};
use wasmer::{BaseTunables, CpuFeature, Engine, Module, Store, Target, Triple};
#[cfg(all(not(target_arch = "wasm32"), feature = "filesystem_cache"))]
#[cfg(not(target_arch = "wasm32"))]
use wasmer::{BaseTunables, CpuFeature, Engine, Target, Triple};
use wasmer::{Module, Store};
use wasmer_cache::{Cache as WasmerCache, FileSystemCache, Hash};

#[cfg(all(not(feature = "filesystem_cache"), not(feature = "memory_cache")))]
Expand Down

2 comments on commit ea4ae3d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ea4ae3d Previous: d13a397 Ratio
es/full/minify/libraries/antd 1956461219 ns/iter (± 117590375) 2034226540 ns/iter (± 15871936) 0.96
es/full/minify/libraries/d3 459575785 ns/iter (± 13290191) 388907855 ns/iter (± 5542238) 1.18
es/full/minify/libraries/echarts 1683915389 ns/iter (± 59182978) 1686861795 ns/iter (± 22705946) 1.00
es/full/minify/libraries/jquery 113134427 ns/iter (± 4385062) 116050730 ns/iter (± 3170194) 0.97
es/full/minify/libraries/lodash 134906115 ns/iter (± 6860213) 133068744 ns/iter (± 3927957) 1.01
es/full/minify/libraries/moment 63738703 ns/iter (± 6889052) 65919683 ns/iter (± 2618686) 0.97
es/full/minify/libraries/react 20762882 ns/iter (± 524492) 22942777 ns/iter (± 1167447) 0.90
es/full/minify/libraries/terser 387076223 ns/iter (± 48375430) 309810341 ns/iter (± 11159965) 1.25
es/full/minify/libraries/three 609578064 ns/iter (± 17516983) 537838121 ns/iter (± 13909809) 1.13
es/full/minify/libraries/typescript 4032025416 ns/iter (± 383853971) 3781597603 ns/iter (± 34715972) 1.07
es/full/minify/libraries/victory 956209419 ns/iter (± 83648026) 797141554 ns/iter (± 22367911) 1.20
es/full/minify/libraries/vue 191921360 ns/iter (± 13895654) 163926120 ns/iter (± 4363373) 1.17
es/full/codegen/es3 34648 ns/iter (± 2672) 37299 ns/iter (± 1897) 0.93
es/full/codegen/es5 34044 ns/iter (± 3973) 37757 ns/iter (± 3281) 0.90
es/full/codegen/es2015 33737 ns/iter (± 1782) 37335 ns/iter (± 1356) 0.90
es/full/codegen/es2016 34044 ns/iter (± 966) 37573 ns/iter (± 5974) 0.91
es/full/codegen/es2017 33896 ns/iter (± 2119) 37985 ns/iter (± 2555) 0.89
es/full/codegen/es2018 110641 ns/iter (± 2098222) 37279 ns/iter (± 1364) 2.97
es/full/codegen/es2019 34401 ns/iter (± 12020) 37402 ns/iter (± 1706) 0.92
es/full/codegen/es2020 34283 ns/iter (± 2758) 38111 ns/iter (± 1865) 0.90
es/full/all/es3 219507176 ns/iter (± 25166291) 221964046 ns/iter (± 8569742) 0.99
es/full/all/es5 246171905 ns/iter (± 50351384) 210963591 ns/iter (± 4347685) 1.17
es/full/all/es2015 183158764 ns/iter (± 19885735) 170770097 ns/iter (± 3454649) 1.07
es/full/all/es2016 174158603 ns/iter (± 13854519) 169356654 ns/iter (± 4211290) 1.03
es/full/all/es2017 159257150 ns/iter (± 20734383) 166297931 ns/iter (± 4383010) 0.96
es/full/all/es2018 153788495 ns/iter (± 17896821) 166224005 ns/iter (± 6797037) 0.93
es/full/all/es2019 156880720 ns/iter (± 24904761) 165176274 ns/iter (± 5847969) 0.95
es/full/all/es2020 154856270 ns/iter (± 19580178) 160596653 ns/iter (± 4690834) 0.96
es/full/parser 739620 ns/iter (± 55627) 813013 ns/iter (± 42831) 0.91
es/full/base/fixer 26419 ns/iter (± 1266) 30002 ns/iter (± 1430) 0.88
es/full/base/resolver_and_hygiene 93966 ns/iter (± 5037) 110132 ns/iter (± 10561) 0.85
serialization of ast node 208 ns/iter (± 8) 230 ns/iter (± 17) 0.90
serialization of serde 211 ns/iter (± 8) 230 ns/iter (± 14) 0.92

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: ea4ae3d Previous: d13a397 Ratio
es/full/codegen/es2018 110641 ns/iter (± 2098222) 37279 ns/iter (± 1364) 2.97

This comment was automatically generated by workflow using github-action-benchmark.

CC: @kdy1

Please sign in to comment.