emscripten-core / emscripten-core/emscripten

[question] Using lazy files in browser in main thread but in async mode

Open
#12,349 1 comment 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 14h
Merged PRs (30d)
125

Description

The docs mention that browsers disallow synchronous XHR and thus lazy files are supported only in Web Worker mode. But binary XHR are supported in async mode, aren't they? When using MODULARIZE'd modules, we're in async mode anyway (and maybe ASYNCIFY could help to yield execution while file is loading over the internet)

(For me, it's mostly a question about consistency/ease of debugging, since in practice the heavy code should be running in Web Worker anyway)

Contributor guide

Open the contributing guide

Research direction

Start with the documentation that limits lazy files to Web Worker mode, then read the MODULARIZE and ASYNCIFY guidance referenced by the issue. Determine whether asynchronous binary XHR can support lazy files on the main thread, and define whether the result should be an implementation change, documentation clarification, or both.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
compilers, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.