WebGL Build Size Issue: Size Increases from 30MB to 1.6GB

Hello everyone,

I’m having trouble with my Unity WebGL build right now. The build was only about 30 MB at first, but when it runs,
it shoots up to about 800 MB, and when you play, it finally reaches about 1.6 GB. This seems over the top, particularly for a WebGL build.

Here’s a breakdown of what’s happening:

Initial build size: ~32MB
Memory usage after startup: ~800MB
Memory usage during gameplay: ~1.6GB

After looking through the scenes and assets, I’m still not sure what’s causing this extreme memory spike.
Has anyone had a similar problem or found a way to maximize WebGL memory usage?

Some details:

Unity Version: Unity 6.0.1f1
Using Assetbundles: Yes
Platform: WebGL
Browser: Chrome
Scene contents: The first scene is launched in order to download the asset bundles from the server. 120 MB make up the bundle size.Once the download is finished, launch the content scenes.

Any advice or suggestions would be greatly appreciated! Thanks in advance.

So taking snapshots with the Memory Profiler gives you no indication what those 1.6 GB are made up off?

Hi @MartinTilo

I apologize for the delayed response, and I appreciate you responding our query. I’ll describe our situation and include the memory profile for the WebGL build.

In my scenario, the WebGL application has a progressing download user interface along with an empty scene.

As soon as the scene loads, our scenes as asset bundles start downloading automatically.

In our use case, before the bundle downloading process, the browser took almost 400 MB.

If there are any tips to shorten or reduce the memory usage of the WebGL application, please share them.

Memory Profile file : MemoryCaptures.zip (1.8 MB)