Skip to content

WASM demo takes 40 seconds to load and is not interactive #2769

Open
@sffc

Description

@sffc

During the 40 seconds it takes to download the latest full-data WASM demo, the page is not interactive.

Short-term solutions:

  1. Go back to using testdata
  2. Add a loading spiral that goes away when WASM is finished loading (this would take about 10 lines of code)
  3. Print an error upon input if the WASM is not loaded

Medium-term solution: download the locale data on demand. Steps to make that work:

  1. The wasm-demo datagen should generate a directory of language-specific postcard files
  2. A data provider should be hooked up that informs JS when root data is being used
  3. JS code that fetches the requested language pack when that callback occurs, and then re-tries the rendering

Steps 1 and 3 should already be achievable via public APIs. Step 2 is doable in Rust but may need an FFI hook. It will be easier to write once callback support is added.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-processComponent: Team processesS-mediumSize: Less than a week (larger bug fix or enhancement)T-enhancementType: Nice-to-have but not requiredgood first issueGood for newcomershelp wantedIssue needs an assignee

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions