Why does my small game take 2+ minutes to load on web?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mburkard

I have a small 3D game, that I exported to HTML5 following the guide in the docs using the export template I installed through the Godot editor. I then hosted my exported project as an http server, first I used python http.server module then I switched to php.

Whether I host a server with python, php, or through the Godot engine with the run in browser option, my project takes about 2 minutes and 10 seconds to load. The pck file is 642 kB, the wasm is 20.4 MB.

I’m running a fairly powerful machine, Ryzen 2600 CPU and Radeon 5700 GPU.
When I look at my system monitor, for the duration of the load time, one of my CPUs is running at 100% the rest are doing nothing.

I’ve loaded Godot games on the web that must be significantly larger than mine that load in a fraction of the time. What could I be doing wrong that results in these incredible load times?

Thanks for any help.

:bust_in_silhouette: Reply From: Calinou

See this GItHub issue for discussion. To speed up the download, consider using a host that supports transparent gzip/Brotli compression such as GitHub Pages – itch.io notably doesn’t support this.

Also, make sure to use the GLES2 renderer instead of GLES3 when targeting HTML5.

Using GLES3 was the big problem, for anyone who comes across this the same problem you can switch from GLES3 to GLES2 at the very top right corner of the Godot editor.

I spent some time looking through the exporter dialog and eventually the export template looking for how to change the renderer.

mburkard | 2020-12-11 20:41