alexcrichton opened issue #4026:
Currently when a
Linker<T>
is used to instantate a module within aStore
we'll useHostFunc::to_func
to convert the linker-defined function into a function that lives within theStore
. This operation, however, is somewhat costly where it will clone anArc
for theStore
to hold onto. This means that when theStore
is dropped thatArc
is also dropped. This happens once-per-function-import in aStore
which when modules import dozens of functions this ends up being a very hotly-contendedArc
when instantiation is happening on multiple threads simultaneously.
alexcrichton labeled issue #4026:
Currently when a
Linker<T>
is used to instantate a module within aStore
we'll useHostFunc::to_func
to convert the linker-defined function into a function that lives within theStore
. This operation, however, is somewhat costly where it will clone anArc
for theStore
to hold onto. This means that when theStore
is dropped thatArc
is also dropped. This happens once-per-function-import in aStore
which when modules import dozens of functions this ends up being a very hotly-contendedArc
when instantiation is happening on multiple threads simultaneously.
alexcrichton commented on issue #4026:
Fixed during https://github.com/bytecodealliance/wasmtime/pull/4051
alexcrichton closed issue #4026:
Currently when a
Linker<T>
is used to instantate a module within aStore
we'll useHostFunc::to_func
to convert the linker-defined function into a function that lives within theStore
. This operation, however, is somewhat costly where it will clone anArc
for theStore
to hold onto. This means that when theStore
is dropped thatArc
is also dropped. This happens once-per-function-import in aStore
which when modules import dozens of functions this ends up being a very hotly-contendedArc
when instantiation is happening on multiple threads simultaneously.
Last updated: Nov 22 2024 at 17:03 UTC