Consider warning in devtools if user compiles huge module without caching
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
People
(Reporter: rhunt, Unassigned)
References
(Blocks 1 open bug)
Details
If a WebAssembly user compiles a huge module (straw man >5MiB) using an array buffer source instead of a fetch, we could post a warning in the devtools console that they should use fetch so that the result can be cached. If we do this, it would be good to have an MDN article to link to explaining how caching works.
This was done before with async scrolling when it detected the web pages was sync modifying the scroll offsets.
One downside of the above criteria is that it's theoretically possible for a user to not be able to use fetch for their module. In this case, they'd have a warning that they wouldn't be able to disable.
One case I know of with programmatic generation of modules is the WebAssembly.Function polyfill. In this case, the modules are tiny so they wouldn't hit the size criteria.
Description
•