Making Shmeppy fast is an important part of the mobile work I talk about in the March 2020 Roadmap. I was planning to start this work after I did the “Server Side Rendering” work I talk about in the roadmap, but a few users reported issues around performance this week so I reshuffled my priorities slightly.
Tonight I’ve deployed what I think will be a very impactful performance improvement.
Shmeppy stores the state of the map as an ever-expanding list of operations (ex: “fill the center cell with red”, “create a token at the center of the map”…). This list of operations can get very big, very quickly.
Previously Shmeppy would send down the entire history of a game whenever you connected to it. This made it take a little bit to join a game, but more importantly, it slowed things down during the game because Shmeppy would have to continuously recalculate the state of the map from the big list of operations (some optimizations/caching was done, but there’s limits to what I could do).
Now Shmeppy’s server compresses all of the operations into a single snapshot before sending it to the client.
This should help improve Shmeppy’s performance across the board: both while joining a map but also while doing things with a map.
Stuck on Reconnecting?
This enhancement necessitated a change to the way the client and server communicate with eachother, in a way that isn’t backwards compatible. Unfortunately that means anyone who was online around 11:30 PM PST (now) found Shmeppy stuck on “Reconnecting…” until they refreshed. Not a super pleasant situation to be in.
From the huge amount of log messages I’m getting about old connection attempts, looks like it’s taking many users quite a long time to figure out that “Reconnecting…” will never turn into “Connected”. Or perhaps they’ve just left their computers on…
To be at least a little better, alongside this performance enhancement is also an improvement to this “backwards incompatible deploy” process. Now in the future when I have to do this, the network box will change to look like this:
Sorry to everyone who was connected tonight… which I think was a few hundred people…