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. Thespidermonkey.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 aBTreeMap
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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
fitzgen submitted PR review.
fitzgen submitted PR review.
fitzgen created PR review comment:
/// things like backtraces so there's no need to eagerly load all of them. By
alexcrichton updated PR #3789 from no-names-in-module
to main
.
alexcrichton merged PR #3789.
Last updated: Nov 22 2024 at 17:03 UTC