gokibitz icon indicating copy to clipboard operation
gokibitz copied to clipboard

Pre-fetch comments for next / previous moves

Open neagle opened this issue 10 years ago • 9 comments

It's probably worth figuring out a smart way to fetch comments for nearby moves in advance. It's a pleasant experience when comments are just immediately in place, and on speedy connections that's usually pretty much what happens, but if you're in a coffee shop (as I am now), with a bit more latency, it can take almost a second.

Supplemental: It'd be nice to have some sort of loading indicator. I don't want it to make movement feel sluggish, but it's weird to have comments suddenly show up after a second. "Oh, I thought there weren't any comments on this move!"

neagle avatar Jan 26 '15 15:01 neagle

One thing I wondered when I first noticed the comment fetching strategy: is it really that costly to fetch all the comments as you load the game? Maybe trimming down the response (e.g. is the "userInfo" obj really useful? the kifu id?)?

sphaso avatar May 19 '15 08:05 sphaso

Good question. The very first kernel of GoKibitz's existence was as a newly born Express app that provided a rest API for creating and retrieving comments for a given kifu id and a specific move. Each move was its own world with its own comment thread, so it made sense to me to be able to retrieve it individually.

Much later, it finally occurred to me to revisit this idea and I wondered the same thing: whether it was really worth dealing with asynchronous loading for each move, and the answer is that I don't know. I still like the idea of being able to make a comparatively light call, because users jump into games all over the place, and I like the idea at least, of not loading all 100 comments on a popular game when someone jumps in to a specific point.

In terms of real user experience, though, I haven't tested exactly what the difference would be and whether it's worth the added complexity. I still like the way this makes games light-weight no matter how many comments are on them (there is at least some theoretical scale where loading all the comments becomes cumbersome), but there's no question that this makes things more complicated than they otherwise could be.

neagle avatar May 19 '15 14:05 neagle

Ah I see. It is true that people hop on games all over the place, but a game of go starts on an empty board :) so someone (I imagine) would skim through the first 20 moves, and that's 20 calls. At the same time, the new "?path=xx" feature would make it more likely to link to positions instead of whole games. In the latter case, fetching comments for one move at the time would make more sense. I'm guessing this is a case of "in medio stat virtus" as you mentioned in your first post :) either fetch nearby comments or adding a loading icon sound like a great improvement to me.

sphaso avatar May 19 '15 15:05 sphaso

+1 for this - I find gokibitz kinda unusable for this reason, because I go through the game looking for the comments - easy to miss if it doesn't load up.

A useful stopgap might be to load up whether a node has comments or not along with the move - that way at least you can say 'hey! this move has comments, wait up for them'

CmdrDats avatar Jan 12 '16 10:01 CmdrDats

I appreciate knowing this is an issue, @CmdrDats. Are you on a particularly slow connection, out of curiosity?

The stopgap you suggest is actually a pretty good idea. I'll see if I can look into that sometime soon.

neagle avatar Jan 13 '16 14:01 neagle

Not crazy slow (10mb line) - It's probably more because there's a half a second of lag before comment shows, so as I'm skimming through the game I don't see the existence of a comment on a node. That said - perhaps I shouldn't be skimming so much xD

CmdrDats avatar Jan 13 '16 18:01 CmdrDats

PS. I'm in South Africa, so perhaps that is a contributing factor xD

CmdrDats avatar Jan 13 '16 18:01 CmdrDats

That's the reason I initially wanted the skip to comment button. That way I can browse to all of them without missing any.

cannanieltf avatar Jan 13 '16 18:01 cannanieltf

Skimming is totally valid, even if for didactic purposes it might be a good idea to go slowly at times. :) But, yeah, this is definitely a usability issue that I need to address.

neagle avatar Jan 13 '16 18:01 neagle