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

Cache Artifacts directly instead of their serialization #666

Closed
wants to merge 6 commits into from

Conversation

webmaster128
Copy link
Member

@webmaster128 webmaster128 commented Dec 14, 2020

Ths creates a new store for every instance. This is needed for metering as well as consistency with file system cache.

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nicer, still wondering what was wrong with storing Modules

packages/vm/src/modules/in_memory_cache.rs Show resolved Hide resolved
let store = make_store_headless(Some(memory_limit));
let new_module = unsafe { Module::deserialize(&store, &serialized_artifact) }?;
let new_module = Module::from_artifact(&store, Arc::clone(artifact));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we just update reference count, clone is super cheap

@webmaster128 webmaster128 changed the title Cache artifacts in memory, not modules Cache Artifacts directly instead of their serialization Dec 16, 2020
@webmaster128
Copy link
Member Author

Updated title and description, as this was outdated.

Base automatically changed from update-wasmer to master December 16, 2020 14:52
@webmaster128 webmaster128 force-pushed the cache-artifact-not-module branch from a428d83 to 355da47 Compare December 16, 2020 15:56
@webmaster128 webmaster128 force-pushed the cache-artifact-not-module branch from 355da47 to 0d1c158 Compare December 29, 2020 18:55
@webmaster128 webmaster128 changed the base branch from master to upgrade-wasmer-santa-edition December 29, 2020 18:55
@webmaster128 webmaster128 force-pushed the cache-artifact-not-module branch 2 times, most recently from 7916272 to 966493b Compare December 29, 2020 23:57
@webmaster128 webmaster128 force-pushed the upgrade-wasmer-santa-edition branch from 82c5be5 to 8703431 Compare December 30, 2020 13:20
Base automatically changed from upgrade-wasmer-santa-edition to master December 30, 2020 19:37
@webmaster128 webmaster128 force-pushed the cache-artifact-not-module branch from 966493b to f868f12 Compare December 30, 2020 19:51
@webmaster128
Copy link
Member Author

This cannot work, see wasmerio/wasmer#1943

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