terriajs
terriajs copied to clipboard
[EPIC] Performance Optimisation
Here were some potential performance problems we've noticed/run into while developing on mobx
Cesium optimisations in knockout that we don't apply in mobx Some things we optimised for terriajs+cesium still only live on master and we haven't ported those improvements through the new model layer.
Catalog items & attribution updates(?) - @na9da please clarify this bit to fix this - go through catalog items, find the cesium APIs where we can update a given catalog item and use that instead of re-creating them each time some attribute changes
Delta satellite imagery. takes 3-4 seconds for satellite imagery to be loaded. unsure if all WMS. but specifically the delta service. thinks it comes down to having to load and parse 12,000 dates from the service
Compass As @soyarsauce has noted in https://github.com/TerriaJS/terriajs/blob/55f664291547c722d7671d6a1003305fc8a4305e/lib/ReactViews/Map/Navigation/Compass.jsx#L5, the compass re-renders endlessly and needlessly, forcing a react re-render but not a browser repaint (unless of course the bearing changes)
Re: mobx in general:
Crispy: mobx should "work all the time" - shouldn't really fail. Whereas in knockout, it was fast, but if you add 3 things/interactions together, you might get start getting weird bugs.
@steve9164 wants to schedule a week in late May for him to focus on this. @AnaBelgun to update with Crispy's chosen time in the planning summary
For the WMS performance problem, checkout these two links for master & mobx.
master - http://ci.terria.io/master/#share=s-fOsAkkPYDtdnU4jWhtza7NPj7wt mobx - http://ci.terria.io/mobx/#share=s-1058naPUvPi8gpxIYMNPkGTw1Dv
Then add the catalog item named "Delta Blended service".
Mobx freezes for a bit before the explorer tab closes. You can also see the difference when splitting the item which essentially duplicates the source item.
I think we should break this down; the optimisation work will likely continue for some time, at least until MobX becomes the master branch (and beyond).
I'll create specific tickets with the above issues and connect to this.
crispy: can probably cut cesium addtomap loop by half
Emma: at some point we need to take an audit of where the big perf costs are
@KeyboardSounds to look at loading/unloading of most important data catalog types, wms csv 3d tiles etc
emma's looked at csv so far, but not the others
more @nf-s ideas, ssr certain things, or templating certain metadata through tjs-server