Improving WASM Performance in Microsoft Edge by Disabling Enhanced Security

 
 
  • Gérald Barré
 

When running a WASM application in Microsoft Edge, you may observe significantly slower performance compared to other browsers (sometimes 5 to 10 times slower). Although Edge uses the same engine as Google Chrome and similar browsers, it introduces a security feature called enhanced security that can impact JS and WASM execution speed.

This feature impacts WASM execution by using an interpreter instead of the faster JIT compiler, prioritizing security over performance. From the documentation:

Developers should be aware that the WebAssembly (WASM) interpreter running in enhanced security mode might not yield the expected level of performance. We recommend adding your site as an exception to opt-out of enhanced security mode for site users.

-- Microsoft Learn

To restore optimal performance, you can add your site as an exception in Microsoft Edge. This enables the JIT compiler for your WASM application.

  • Go to Settings > Privacy, search, and services > Security > Sites with enhanced security (edge://settings/privacy/security/secureModeSites)
  • Add your site to the "Never use enhanced security for these sites" list

Edge security exceptionEdge security exception

Alternatively, you can quickly disable enhanced security for the current site by clicking the shield icon in the address bar and choosing "Disable enhanced security for this site."

Disable enhanced security for this siteDisable enhanced security for this site

Disable enhanced security for this site - checkboxDisable enhanced security for this site - checkbox

Do you have a question or a suggestion about this post? Contact me!

Follow me:
Enjoy this blog?Buy Me A Coffee💖 Sponsor on GitHub