planetary-ios icon indicating copy to clipboard operation
planetary-ios copied to clipboard

Cache connected peers info so it loads faster

Open rabble opened this issue 1 year ago • 1 comments

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

rabble avatar Oct 05 '22 01:10 rabble

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.

mplorentz avatar Oct 05 '22 18:10 mplorentz

show the greyed out peers for past connections. Keep that cached so that when the user returns they see the old peers.

rabble avatar Oct 24 '22 20:10 rabble

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.

danlatorre avatar Dec 15 '22 17:12 danlatorre