terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

[EPIC] Performance Optimisation

Open soyarsauce opened this issue 4 years ago • 8 comments

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.

soyarsauce avatar Apr 29 '20 06:04 soyarsauce

@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

soyarsauce avatar Apr 29 '20 06:04 soyarsauce

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.

na9da avatar Apr 29 '20 07:04 na9da

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.

AnaBelgun avatar May 01 '20 00:05 AnaBelgun

crispy: can probably cut cesium addtomap loop by half

soyarsauce avatar May 19 '20 03:05 soyarsauce

Emma: at some point we need to take an audit of where the big perf costs are

soyarsauce avatar Sep 14 '20 06:09 soyarsauce

@KeyboardSounds to look at loading/unloading of most important data catalog types, wms csv 3d tiles etc

soyarsauce avatar Sep 14 '20 06:09 soyarsauce

emma's looked at csv so far, but not the others

soyarsauce avatar Oct 26 '20 05:10 soyarsauce

more @nf-s ideas, ssr certain things, or templating certain metadata through tjs-server

soyarsauce avatar Oct 26 '20 05:10 soyarsauce