Can I determine optimum WebGL Memory Size?

We have some customers (schools) with older computers that are running into memory allocation problems. Our applications are pretty trivial compared to the slick games most of you all create.

  • Is there some way to look at our content specifically and make a good guess as to what setting “WebGL Memory Size” should be?
  • Is it simply a matter of lowering the setting to see if our game still works properly or would that cause problems in some cases that we would not even know about?

FWIW, this question is related …

Thanks!

Well, I don’t really understand why you are asking the same question again.

Think about it the same way as you do when building for a mobile device. Will this device with 256Mb RAM run my game? What should I do to optimize my memory consumption? What if I have a 128Mb RAM device, will it work there? It’s the same here but you control how much memory your device has. You need to optimize for that.

But the problem is not really in webgl memory block size now. This is just what Unity thinks as memory available for it at runtime.

WebGL game also has this .data file which is loaded by browser and is never unloaded. It’s like a hard drive in your mobile device, but this time we have to hold hard drive (with virtual file system) in browser memory.

When loading data and compiling code in browser memory some duplication is unavoidable. And right now Chrome is very bad at it. When it’s loading a game it grows more than 2x of what will be needed after loading is complete. At this step Chrome tabs on most of old PCs and laptops just crash.

If your school uses Chrome and has <4Gb RAM probably your game won’t work there. Use FIrefox, use “Fastest” optimization mode, don’t build in Development, turn on stripping, turn off exceptions, remove code, remove images and check for half-empty atlases.