Loading the world map is much slower on a remote server compared with running Seshat locally. This is probably because of having to load all the shapes across the network. When I have a poor internet connection, it's slower still.
Timing
My Mac dev
VM dev
My Mac extend-shapesData
VM extend-shapesData
Time to load one polity
2
2
Time to load one year
8
30
3
9 (+7)
Time to load all polities
22 (+14)
90 (+60)
15 (+12)
71 (+62)
Time to load basemap shapes
25 (+3)
18 (+3)
84 (+13)
TODO
[x] Have a single shapeData dict that map_view_initial and map_view_all both load into (see Jim email)
95
Make sure Polity page loads without the map first not sure what I meant here
[x] Load one polity (british empire 2) first so it's nice and fast
[x] highlight it straight away and add to legend
[x] Make sure the initial year matches the url
[x] Remove the reload (never do page reload in the storeYear() func)
[x] Update loading text
[x] Ensure final year of slider is polity end year, not 2014
[x] Un-grey animation
[x] [maybe] Load all the polities for one year
If the year slider moves at this point, add a warning to say not all polities loaded for the new year yet, but don't refresh the page/ re-run map_view_initial as currently done (never do page reload in the storeYear() func)
[or maybe] can we run plotPolities every 5 seconds or so whilst still loading all? tried this and also tried a pagination/chunking approach (see extendShapesData-pagination) to no avail
[x] Load all the polities and ensure the year slider range is updated
[x] Make the initial polity choice random? Or maybe just switch it to Roman empire
Clicking "world map" from a polity page should set it as that polity
Is shapesData from one loaded polity worth caching for polity pages (or world map if it's just one initially)? now that it's random no
Another idea could be to load the sequence of Roman polities first, but this would make it slower not worth the effort to implement
Problem
Loading the world map is much slower on a remote server compared with running Seshat locally. This is probably because of having to load all the shapes across the network. When I have a poor internet connection, it's slower still.
Timing
dev
dev
extend-shapesData
extend-shapesData
TODO
95
Make sure Polity page loads without the map firstnot sure what I meant herestoreYear()
func)If the year slider moves at this point, add a warning to say not all polities loaded for the new year yet, but don't refresh the page/ re-run map_view_initial as currently done (never do page reload in thestoreYear()
func)[or maybe] can we run plotPolities every 5 seconds or so whilst still loading all?tried this and also tried a pagination/chunking approach (seeextendShapesData-pagination
) to no availClicking "world map" from a polity page should set it as that polityIs shapesData from one loaded polity worth caching for polity pages (or world map if it's just one initially)?now that it's random noAnother idea could be to load the sequence of Roman polities first, but this would make it slowernot worth the effort to implementworld_map_one_year