Sandcastle page load time

Hi Guys,

I setup a sandcastle cesium app at my website. The page contains a JS datatable and cesium globe. Data in the datatable is coming from db. Based on the data, i added a polyline, billboard and ellipsoid on the cesium globe.
When the page loads it take much time and its too slow. Can you guys help me to improve sandcastle page load time? Any suggestions ?

Thanks,
Kulvinder

Do you see this performance issue only when you run Sandcastle on your website, or also when you run a simple app like the Hello World here: https://github.com/CesiumGS/cesium/blob/master/Apps/HelloWorld.html ?

Have you profiled using the console/network tab to see if the slowdown is a network issue or a CPU/rendering issue?

Thanks for replying.

Issue is in my website sandcastle. I checked page load time and it say too many https redirects and rendering,
Thanks

While investigating i found the Sandcastle javascript needs to be minified, when cesium sandcastle loads, it call many of the cesium javascript files. Those take too much of time to gets loaded and are not in minified form.


@kulvinderjatt thanks for the additional information. Make sure you’re using the built version of Sandcastle, which should all be minified (this is what https://sandcastle.cesium.com/index.html uses).

Also note that Sandcastle is designed to be an online testing environment. So I would advise against hosting your production apps inside Sandcastle.

Hi Omar,
Thanks for replying.

Yes my app is hosted within sandcastle. Like: htttp://example.com/cesium/Apps/Sandcastle/gallery/abc.php

Thanks,
Kulvinder

Hi Omar,

I just checked, the default sandcastle link produced the following result: https://gtmetrix.com/reports/sandcastle.cesium.com/uWZKaDoi

https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fsandcastle.cesium.com%2Findex.html

Please check at above link to check the page load time, the same is happening with my app.

Thanks,
Kulvinder

Can you tell me why you’re running your app in Sandcastle, as opposed to running it directly like this app: https://cesium.com/cesiumjs/cesium-viewer/index.html? ?

This is the recommended way of hosting your app, as described here: https://cesium.com/docs/tutorials/getting-started/

Hi Omar,
Thanks for pointing this. I will try to shift my app as you told and check how goes.

Much thanks!

Can you please guide me on my another post how i can achieve this: How ellipsoid color can be changed when it is clicked

Hi Omar,

After moving my app at http://example.com/cesium/Apps/CesiumViewer/abc.php I started getting following errors:

Sandcastle is not working in CesiumViewer and throwing above mentioned errors. How can these error be fixed or will it work as stated above ?

This is how i linking the files:

I think you need to set the CESIUM_BASE_URL global variable as described here: v1.63 regression - window.CESIUM_BASE_URL undefined

Hi Omar,

Much thanks!!

You nailed it.

I Appreciate your guidance. Thanks alot!!!

Kulvinder Singh

1 Like

Hi Omar,

I moved my app under Cesium Viewer (http://abc.com/cesium/Apps/CesiumViewer/abc.php)now, but still same results


When i load my app, lots of cesium files are loaded in background. This is not solved correctly, the page is loading with too many requests. clear my cache and refresh page, it takes much longer to load than it should.

This looks like you’re using the unbuilt version of CesiumJS. Make sure you’re running the built version, which should not be pulling any code from the Source/ directory.