Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use serialize_to_file/deserialize_from_file from Wasmer #660

Closed
wants to merge 6 commits into from

Conversation

webmaster128
Copy link
Member

No description provided.

@webmaster128
Copy link
Member Author

This change seems to slow down module loading from FS from 1.4ms to 2ms. Will do more menchmarking.

@syrusakbary
Copy link

syrusakbary commented Dec 11, 2020

Note: I think we don't use memmap when deserializing from file by default... it will be a great addition/PR to the codebase to use mmap in Engine::deserialize_from_file!

@webmaster128
Copy link
Member Author

Note: I think we don't use memmap when deserializing from file by default... it will be a great addition/PR to the codebase to use mmap in Engine::deserialize_from_file!

Jupp, I found this as well. Good point.

Did you have any specific reason to remove it along the way? There is an unused memmap dependency in https://github.com/wasmerio/wasmer/blob/1.0.0-beta1/lib/cache/Cargo.toml#L15

@syrusakbary
Copy link

Did you have any specific reason to remove it along the way?

Good catch. Let's remove memmap from wasmer-cache and add it to wasmer-engine

@webmaster128
Copy link
Member Author

And with wasmerio/wasmer#1927 we're back to 1.2 ms 🐎

@webmaster128 webmaster128 changed the base branch from master to update-wasmer December 14, 2020 00:59
bors bot added a commit to wasmerio/wasmer that referenced this pull request Dec 14, 2020
1927: Use memmap2 in deserialize_from_file r=syrusakbary a=webmaster128

# Description

As discussed in CosmWasm/cosmwasm#660, we might want to use memmap in deserialize_from_file to speed up artifact loading.

This uses the fork memmap2 because https://rustsec.org/advisories/RUSTSEC-2020-0077.html

~This is based on df3a211 and a CHANGELOG entry is missing, but adding it now for visibility and testing.~

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Simon Warta <simon@warta.it>
@webmaster128
Copy link
Member Author

Integrated into #663

@webmaster128 webmaster128 deleted the module-helpers branch December 14, 2020 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants