Closed cvan closed 3 months ago
Here it tooks 6.18 seconds to load to uploaded site. Perhaps it take more time if is with budo in localhost?
Notice in the first sentence that I'm talking about production. I said between 6 and 10 seconds. You said 6.18, so that's within the range I'm talking about.
As mentioned above as well, the audio files are definitely low-hanging fruit to speed things up so we're not intentionally blocking the scene for no reason.
Also, 204 requests and 18.4 MB is a ton to synchronously load before showing the user anything.
I agree with this: https://twitter.com/jaffathecake/status/776015862914514944
In production, I've seen initial page loads take as long as 10 seconds (usually between 6 and 10) and subsequent page loads of 5 seconds (usually between 2.5 and 5). With the local dev server, things are even slower where things aren't gzip'd, served from an HTTP/2 server, etc.
Assets, especially for a game of this size, should be progressively loaded when possible.
There's a bunch of logic in the JS to explicitly block the rendering of the scene until every asset is loaded. This means the user sees a spinning loading throbber icon while 10 MB of assets download.
The lowest-hanging fruit would be all the audio files (
.ogg
), which could certainly be loaded in the background while the scene is rendered.(And I filed #76 about the lack of visual cues/progress/error states that something's actually happening.)