planetary-ios
planetary-ios copied to clipboard
Cache connected peers info so it loads faster
When stats are collected from go-ssb we should cache it in memory so that it can be immediately put in to the connected peers. Then we can requested updated stats and show the new stuff. This is like how web browsers save an image of the web page but not the full content or state, and once you try and load, it replaces the image with the real thing.
![Screen Shot 2022-10-05 at 2 53 59 PM](https://user-images.githubusercontent.com/76/193962811-eb619830-f08d-47bc-b062-43e11a794ba9.png)
Hmm to me no information is better than misinformation, which is what a cached value would be. I think it would be better to just make this information load fast enough that it doesn't matter. It should be fast in scuttlego I think.
Another thing I experimented with was to just always be requesting connected peers even when we aren't showing this screen. That way we have a fairly recent value to display as soon as the user opens it. Unfortunately the call to get these statistics increases the likelihood that go-ssb will deadlock, so I didn't go that route.
show the greyed out peers for past connections. Keep that cached so that when the user returns they see the old peers.
This brings up a larger UX principle issues arond "visibility of system status" -- there are many status realties to convey -- like video game HUDs in RPGs the users' health + other status is all conveyed in a complex little corner of the app. How might Planetary be better about system status? Important design work to do here.