Jump to content

Why my babylon scene on Azure is very slow to load?


Zino54220
 Share

Recommended Posts

Locally, the files are already there.  30 seconds for only local sounds huge.  

The biggest drivers of load performance from any net server is your connection to your isp, in terms of line speed & latency.

The server speed, its connection, line speed, & latency is next biggest driver.  The # of hops also contributes.  With any CDN, much of that is probably made a non factor.  Azure will probably closely resemble other CDN's.

 

Link to comment
Share on other sites

Thanks gentlemen,

I added this code in section system.webServer of the root web.config file but always slow...

<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
		  <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
		  <dynamicTypes>
			  <add mimeType="text/*" enabled="true"/>
			  <add mimeType="message/*" enabled="true"/>
			  <add mimeType="application/javascript" enabled="true"/>
			  <add mimeType="*/*" enabled="false"/>
		  </dynamicTypes>
		  <staticTypes>
			  <add mimeType="text/*" enabled="true"/>
			  <add mimeType="message/*" enabled="true"/>
			  <add mimeType="application/javascript" enabled="true"/>
			  <add mimeType="*/*" enabled="false"/>
		  </staticTypes>
	  </httpCompression>

 

Link to comment
Share on other sites

The .babylon file make 57 mo and there is 21 .png files for textures. The scene is animated but it's not finish! So it risks becoming heavier... Maybe I have problems on my scene or anything else...

I would like make a demo in few times but actualy it's to slow for users...

Link to comment
Share on other sites

Make sure using f12 network analysis tool that you are sending gzipped version of your scene 57Mo should be around 10mo once gzipped

You can also think about using binary version of .babylon: http://doc.babylonjs.com/tutorials/09._Using_the_Incremental_Loading_System

 

Also, you may think about caching your data locally: http://doc.babylonjs.com/tutorials/07._Caching_Resources_in_IndexedDB

Link to comment
Share on other sites

Thanks for your answers Deltakosh! Especially the manifest file very interesting for the off line mode...

I don't understand the incremental loading system... And I don't know what I must looking for in f12 consol but I added this in the section "system.webServer" of my web.config file :

<staticContent>
		  <mimeMap fileExtension=".hdr" mimeType="application/hdr" />
		  <mimeMap fileExtension=".obj" mimeType="application/obj" />
		  <mimeMap fileExtension=".dds" mimeType="application/dds" />
		  <mimeMap fileExtension=".tga" mimeType="application/tga" />
		  <mimeMap fileExtension=".fx" mimeType="application/fx" />
		  <mimeMap fileExtension=".babylon" mimeType="application/babylon" />
		  <mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" />
		  <mimeMap fileExtension=".cache" mimeType="text/cache-manifest" />
		  <!--<mimeMap fileExtension=".mp4" mimeType="video/mp4" />-->
	  </staticContent>
	  <httpCompression>
		  <dynamicTypes>
			  <clear />
			  <add enabled="true" mimeType="text/*"/>
			  <add enabled="true" mimeType="message/*"/>
			  <add enabled="true" mimeType="application/x-javascript"/>
			  <add enabled="true" mimeType="application/javascript"/>
			  <add enabled="true" mimeType="application/json"/>
			  <add enabled="true" mimeType="application/atom+xml"/>
			  <add enabled="true" mimeType="application/atom+xml;charset=utf-8"/>
			  <add enabled="true" mimeType="application/babylonmeshdata" />
			  <add enabled="true" mimeType="application/babylon"/>
			  <add enabled="false" mimeType="*/*"/>
		  </dynamicTypes>
		  <staticTypes>
			  <clear />
			  <add enabled="true" mimeType="text/*"/>
			  <add enabled="true" mimeType="message/*"/>
			  <add enabled="true" mimeType="application/javascript"/>
			  <add enabled="true" mimeType="application/atom+xml"/>
			  <add enabled="true" mimeType="application/xaml+xml"/>
			  <add enabled="true" mimeType="application/json"/>
			  <add enabled="true" mimeType="application/babylonmeshdata" />
			  <add enabled="true" mimeType="application/babylon"/>
			  <add enabled="false" mimeType="*/*"/>
		  </staticTypes>
	  </httpCompression>

 

I also added a manifest file called "myScene.babylon.manifest" with this content :

{
  "version" : 1,
  "enableSceneOffline" : true,
  "enableTexturesOffline" : true
}

In the same folder of my scene :

Azure_capture2.png.7d4ae9d520d9d05efb859

 

And It's better! Only few second to load the scene (not for the first connection) but when I open the debug consol, I see again an error about manifest file :

Azure_capture.png.7d14b90b4d96521a53a66d

Why ??

And of course, the first connection is still very slow :( ... always two or three minutes in my work or in my home with several computers.

Maybe the Asset Manager can help me to understand what is very slow to load in my scene???

 

 

Link to comment
Share on other sites

Glad you at least got the reload time down.  The gzip is only going to work on text files.  You have many .png files.  .png files are not compressed.  This may be because our textures are cause.  You might want to add up how much of space is taken up by them.

You might wish to switch their format to .jpg.  Unfortunately, jpg2000 might give you problems in windows machines, so do not think you want to do that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...