Search Unity

WebGL loading speed on aws ubuntu node server is too slow.

Discussion in 'Web' started by dansav, Mar 11, 2019.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    I have an aws ec2 server with ubuntu 16.04. I'm running Node to serve a unity webgl page. The WebGl has a 200mb data file that takes 71 seconds to load every time I load it. How can I get the loading time down? On my local computer it loads in 4 seconds. Is this a problem with the server or my output settings. Or just the server speed? Why isn't it caching?

    Edit: I just tested the server download of the same file. It's taking about 72 seconds for the data file to download directly, so that may explain it, but why isn't it caching the second time I load the page?

    My player settings are:
    dynamic batching: checked
    compression format: gzip
    data caching: checked
    linker target :WebAssembly
    scripting runtime: .net 4.x equivalent
    C++ compiler configuration: release
    Strip Engine Code: checked

    My node script is
    Code (JavaScript):
    1. var express = require('express');
    2. var app = express();
    3. var http = require('http').Server(app);
    4. var path = require('path');
    5. app.use(express.static('public'));
    6. app.use(compression());