-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Degradation with CatalogSearchView and Cesium Map Loading #2145
Comments
After exploring different methods for dynamically/asynchronously loading Cesium, I haven't found a strategy that prevents the library from blocking other resources during its load phase. I even experimented with loading Cesium near the start of the page load process on a page that does not use Cesium at all (by simply using Here is a link to the "profile" file from the Chrome dev tools performance tab (this file can be imported into the dev tools by right-clicking on the performance tab and opting for "Load profile..."). The performance profile looks like this: I see two paths forward:
For the second strategy, it might be possible to import only the required Cesium modules using |
Progress update:
|
Loading Cesium from a CDN for now, and will come back to this issue after releasing the Data Catalog with Cesium |
Here are some lighthouse results from the ADC catalog with Cesium that demonstrate the ways in which Cesium slows down the page performance. Cesium is one of the worst offenders in several categories: enormous network payloads, JS execution time, main thread blocking, and unused code. |
There is a substantial load time issue with the soon-to-be-released
CatalogSearchView
that uses theCesium
map. Compared to the currentDataCatalogView
which uses Google Maps, the loading performance on a simulated "Fast 3G" connection has nearly doubled.Specifically, the older
DataCatalogView
with Google Maps takes approximately 40s to load, which is already an issue (see related issues on performance). The newCatalogSearchView
with Cesium takes around 75s, further exacerbating the problem.Here are the results from a casual test looking at the time it takes from a hard refresh until the map is visible (on the "Fast 3G" connection):
Cesium Tests:
Google Maps Tests:
We are currently loading a combined build of Cesium.js which, even minified, is 3.5 MB and takes about 25s total to load. You can see here that at some point in loading the library, other requests are blocked:
At the very least, rendering of other parts of the UI should not be blocked while the Cesium map is loading. Using an inline require for Cesium and starting with a skeleton loading view would help.
Longer term solutions:
Suggestions about how to avoid further slowing down the load time are highly welcome!
The text was updated successfully, but these errors were encountered: