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

[browser] wasm memory snapshot into browser cache #82049

Merged
merged 56 commits into from
Mar 14, 2023

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 13, 2023

  • create memory snapshot after first load
  • skip downloads of assets when there is memory already in cache
  • resize wasm memory as necessary and apply the cached memory bytes
  • calculate hash for all assets and the config file
  • added new .withStartupMemoryCache() public API. true by default.
  • start threads and eventPipe bit later (after taking snapshot)
  • disabled JITERP during creation of snapshot.

Other

  • cleanup of anyModule
  • moved ICU shard logic to icu.ts

@pavelsavara pavelsavara added this to the 8.0.0 milestone Feb 13, 2023
@pavelsavara pavelsavara requested a review from maraf February 13, 2023 21:15
@pavelsavara pavelsavara self-assigned this Feb 13, 2023
@ghost
Copy link

ghost commented Feb 13, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
  • create memory snapshot after first load
  • skip downloads of assets when there is memory already in cache
  • resize wasm memory as necessary and apply the cached memory bytes
  • calculate hash for all assets and the config file
  • added new .withMemoryCache() API - internal for now
  • added new MSBuild property WasmNativeAssetsPath so that files could be hashed in WasmAppBuilder

Other

  • cleanup of anyModule
  • removed obsolete mono_load_runtime_and_bcl_args
Author: pavelsavara
Assignees: pavelsavara
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara pavelsavara force-pushed the browser_memory_snapshot3 branch from 650d283 to bf9ef4d Compare March 3, 2023 16:32
# Conflicts:
#	src/mono/wasm/runtime/types.ts
@kg
Copy link
Member

kg commented Mar 3, 2023

Is this being turned on by default?

src/mono/wasm/runtime/icu.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/storage.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/strings.ts Outdated Show resolved Hide resolved
@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara requested review from maraf and kg March 13, 2023 11:24
@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara
Copy link
Member Author

CI failures

Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

src/mono/wasm/memory-snapshot.md Outdated Show resolved Hide resolved
src/mono/wasm/memory-snapshot.md Outdated Show resolved Hide resolved
src/mono/wasm/runtime/assets.ts Outdated Show resolved Hide resolved
src/mono/wasm/runtime/assets.ts Outdated Show resolved Hide resolved
pavelsavara and others added 5 commits March 14, 2023 09:24
Co-authored-by: Marek Fišera <mara@neptuo.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
@pavelsavara pavelsavara merged commit bb2b860 into dotnet:main Mar 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 2023
@pavelsavara pavelsavara deleted the browser_memory_snapshot3 branch September 2, 2024 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants