Stream: git-wasmtime

Topic: wasmtime / PR #3789 Move function names out of `Module`


view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 19:19):

alexcrichton opened PR #3789 from no-names-in-module to main:

This commit moves function names in a module out of the
wasmtime_environ::Module type and into separate sections stored in the
final compiled artifact. Spurred on by #3787 to look at module load
times I noticed that a huge amount of time was spent in deserializing
this map. The spidermonkey.wasm file, for example, has a 3MB name
section which is a lot of unnecessary data to deserialize at module load
time.

The names of functions are now split out into their own dedicated
section of the compiled artifact and metadata about them is stored in a
more compact format at runtime by avoiding a BTreeMap and instead
using a sorted array. Overall this improves deserialize times by up to
80% for modules with large name sections since the name section is no
longer deserialized at load time and it's lazily paged in as names are
actually referenced.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 19:35):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 19:35):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 19:35):

fitzgen created PR review comment:

/// things like backtraces so there's no need to eagerly load all of them. By

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 19:52):

alexcrichton updated PR #3789 from no-names-in-module to main.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2022 at 20:34):

alexcrichton merged PR #3789.


Last updated: Nov 22 2024 at 17:03 UTC