mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Switch to pooling copy-on-write instantiation strategy for WASM (#11232)
* Switch to pooling copy-on-write instantiation strategy for WASM * Fix benchmark compilation * Fix `cargo fmt` * Fix compilation of another benchmark I've missed * Cleanups according to review comments * Move `max_memory_size` to `Semantics` * Set `memory_guaranteed_dense_image_size` to `max_memory_size` * Rename `wasm_instantiation_strategy` to `wasmtime_instantiation_strategy` * Update the doc-comments regarding the instantiation strategy * Extend the integration tests to test every instantiation strategy * Don't drop the temporary directory until the runtime is dropped in benchmarks * Don't drop the temporary directory until the runtime is dropped in tests
This commit is contained in:
@@ -46,7 +46,7 @@ use sc_client_api::{
|
||||
};
|
||||
use sc_client_db::PruningMode;
|
||||
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy, ImportResult, ImportedAux};
|
||||
use sc_executor::{NativeElseWasmExecutor, WasmExecutionMethod};
|
||||
use sc_executor::{NativeElseWasmExecutor, WasmExecutionMethod, WasmtimeInstantiationStrategy};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_block_builder::BlockBuilder;
|
||||
use sp_consensus::BlockOrigin;
|
||||
@@ -398,7 +398,14 @@ impl BenchDb {
|
||||
let backend = sc_service::new_db_backend(db_config).expect("Should not fail");
|
||||
let client = sc_service::new_client(
|
||||
backend.clone(),
|
||||
NativeElseWasmExecutor::new(WasmExecutionMethod::Compiled, None, 8, 2),
|
||||
NativeElseWasmExecutor::new(
|
||||
WasmExecutionMethod::Compiled {
|
||||
instantiation_strategy: WasmtimeInstantiationStrategy::PoolingCopyOnWrite,
|
||||
},
|
||||
None,
|
||||
8,
|
||||
2,
|
||||
),
|
||||
&keyring.generate_genesis(),
|
||||
None,
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user