Hello I have a problem! I transfer my project from unity 5.2.4 to unity 5.5 and make Build for WebGL WebGL.data in unity 5.2 takes 48mb and in unity 5.5 50mb uncompression. When i statrs those build and look in broweser console/network - i see thats chrome downloads WebGL.data just 8.2 mb by unity 5.2 and for unity 5.5 he downloads - full 50 mb WebGL.data, so builds by unity 5.5 its slower about 4 times like for me!!! Can anyone tell me how i can solve this problem in unity 5.5 ?
the main problem not in compression, its in how chrome download this both webgl.data on 5.2 app starts about 20 sec on 5.5 app astart more than 1 min ( because webgl.data full dpwnloads - 50 mb)
http://web.rollinom.co.il/Viewer/0.408/WebGL/WebGL.data http://web.rollinom.co.il/Viewer/0.408/WebGL/WebGL.js Working release link: http://web.rollinom.co.il/Viewer/?345fc7052df0774fa0aa43b1d04f8608&v=0.408
Your game seems to be correctly set up for compression. The data file is ~52 MB uncompressed, but is transferred compressed. It seems compression only helps a little here, bringing the size which is actually transferred down to ~43MB. I don't know why 5.2 would be any smaller. This may not be a WebGL specific issue at all. Do you see a size increase when building to other platforms? Can you check what uses size in the Editor.log (see here for how to do that: https://docs.unity3d.com/Manual/ReducingFilesize.html)? One thing which comes to mind is that IIRC there was a change in which Shader variants get included for "Always included Shaders" (https://docs.unity3d.com/Manual/class-GraphicsSettings.html). See if you have Shaders in there which you can remove.
I make investigation and get next results: build by unity 5.2.4 has 17 shaders inside and I get this size :. If we take Unity 5.2.4 main files WebGL.data and WebGL.js Uncompressed size of WebGL.data = 48 MB Uncompressed size of WebGL.js = 27 MB Total uncompressed size = 75 MB But when it transfer by net it compressed. Compressed size of WebGL.data = 6 MB Compressed size of WebGL.js = 6 MB Total compressed size = 12 MB build by unity 5.5 I have the same number of shaders inside and I get this sizes: Compressed size of WebGL.data = 50 MB Compressed size of WebGL.js = 80 kB Total compressed size = 50.08 MB When i remove all shaders from build in unity 5.5 I get this number: WebGl.data to 5MB Also i make build by 5.5 with one "Standard" shader inside, i get huge increase of size WebGL.data - 33.8 MB I'm trying to understand why the same build with Unity 5.5 compression takes 44 mb more then Unity compression in 5.2.4 Do you have any suggestion?
It's the Standard Shader that is causing the massive build size. We had/have the same issue: https://forum.unity3d.com/threads/webgl-build-size.416219/