alexcrichton opened issue #4026:
Currently when a
Linker<T>is used to instantate a module within aStorewe'll useHostFunc::to_functo convert the linker-defined function into a function that lives within theStore. This operation, however, is somewhat costly where it will clone anArcfor theStoreto hold onto. This means that when theStoreis dropped thatArcis also dropped. This happens once-per-function-import in aStorewhich when modules import dozens of functions this ends up being a very hotly-contendedArcwhen instantiation is happening on multiple threads simultaneously.
alexcrichton labeled issue #4026:
Currently when a
Linker<T>is used to instantate a module within aStorewe'll useHostFunc::to_functo convert the linker-defined function into a function that lives within theStore. This operation, however, is somewhat costly where it will clone anArcfor theStoreto hold onto. This means that when theStoreis dropped thatArcis also dropped. This happens once-per-function-import in aStorewhich when modules import dozens of functions this ends up being a very hotly-contendedArcwhen 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 aStorewe'll useHostFunc::to_functo convert the linker-defined function into a function that lives within theStore. This operation, however, is somewhat costly where it will clone anArcfor theStoreto hold onto. This means that when theStoreis dropped thatArcis also dropped. This happens once-per-function-import in aStorewhich when modules import dozens of functions this ends up being a very hotly-contendedArcwhen instantiation is happening on multiple threads simultaneously.
Last updated: Dec 13 2025 at 19:03 UTC