Search Unity

Long load times for asm.js

Discussion in 'Web' started by grimunk, Mar 17, 2017.

  1. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    278
    Hi all,

    Is anyone experiencing very long load time for asm.js? I have noticed that in certain situations, such as being somewhere with not quite stellar internet like a hotel, asm.js takes a long time to load - the worst I've seen so far is 15 minutes. When I checked in the debugging tools, it showed that asm.js was not compressed, and that the server it was coming from was slow.

    Is it possible to host our own asm.js (or a gzipped version)?
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Did you deploy a release version? (so that the generated build is gz-compressed)
     
  3. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    278
    It is a release build. I see that asm.js is included, and it not gzipped. I suppose we could a gzip module, however is there any way to gzip it and import the .gz?
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    release builds asm.js file is supposed to be compressed. Did you open the file locally after building your project?
     
  5. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    278
    No we didn't open it locally - and we're not using OSX (has the auto-unzip behavior). We have deployed the version under /Release, but it definitely didn't get compressed once it was deployed. We'll try it again a bit later and I'll post an update.