Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Chrome + asm.js

Discussion in 'WebGL' started by haukursteinn, Jan 8, 2016.

  1. haukursteinn

    haukursteinn

    Joined:
    Apr 23, 2014
    Posts:
    6
    Hi everyone,

    We're currently checking the feasibility of porting our iOS 3d game over to the Web.

    Has google made any statement indicating that Chrome will implement asm.js support before WebAssembly is introduced?

    The performance difference between Firefox and Edge vs. Chrome is just staggering.

    Thanks!
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Chrome does support asm.js already, though there is a performance gap between Firefox and Chrome. Google is still improving their asm.js implementation and if you have a use-case that shows a big difference in performance, I think they will be willing to take a look at it.
     
  3. haukursteinn

    haukursteinn

    Joined:
    Apr 23, 2014
    Posts:
    6
    Hi @Marco Trivellato and thanks for the quick reply!

    The confusion stems from the Unity WebGL Browser Compatibility Documentation indicates that Chrome does not support asm.js.

    Our Problems:
    1. Huge difference in scripting execution time between Chrome (~11ms) vs. Firefox (~0.3ms).
    2. UI OnDrag in Chrome results in performance stutters which are not present in Firefox.

    Do you think it's possible to present these as use-cases for the chrome team? As for problem (1) the execution time is about 36 times faster in Firefox.

    Chrome.PNG Firefox.PNG

    You can take a look at the project live on the following URL: http://thorgeirworkspace.azurewebsites.net/

    Do you have any advice how to proceed?
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It's only the AOT compilation that is not supported.

    Perhaps it's clearer from this table here.

    As you can see in the latest benchmarks results, there is a gap in scripting execution performance between Firefox and Chrome but not as much as you report. Maybe it's a specific case that they haven't optimized for.
    So, yes, it looks like this should be reported to Google. You can either do it yourself here, or you submit a bug report with the project to us so that we can investigate a bit further, and we will take it from there :)
     
    Last edited: Jan 11, 2016
  5. haukursteinn

    haukursteinn

    Joined:
    Apr 23, 2014
    Posts:
    6
    Ah, of course!

    Just submitted a bug report:
    761008 - (Open) Chrome 36 times slower script execution than Firefox

    Thanks for your assistance @Marco Trivellato, hope the staggering performance difference in this case warrants some additional investigation :)

    Would you be willing to post here if the case gets relayed to the Chromium issue tracker?

    Cheers!