Open Bug 1767710 Opened 3 years ago Updated 3 years ago

Consider warning in devtools if user compiles huge module without caching

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

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.

You need to log in before you can comment on or make changes to this bug.