KGS Game Archives: suggestion for improvement

Comments, questions, rants, etc, that are specifically about KGS go here.
Post Reply
walleye
Dies with sente
Posts: 124
Joined: Wed Apr 28, 2010 7:56 pm
Rank: IGS 1k
GD Posts: 0
Has thanked: 5 times
Been thanked: 13 times

KGS Game Archives: suggestion for improvement

Post by walleye »

Is there any particular reason why KGS Game Archives give links to months even if the player didn't play any games in those months?
It is perfectly capable of filtering the months before the first game and after the last game. Why does it not filter the empty months in between.

For example, here's a link to the first month of Yamabushi (for no particular reason)

http://www.gokgs.com/gameArchives.jsp?u ... 03&month=6

There is a table on the page with links to different months when presumably Yamabushi played some games.
The table gives the impression Yamabushi played some games in every month from Jun 2003 to Feb 2007.
This is not the case, however. Most of the months are empty.

It would be nice if those empty months were not displayed.
User avatar
wms
Lives in gote
Posts: 450
Joined: Tue Apr 20, 2010 4:23 pm
GD Posts: 0
KGS: wms
Location: Portland, OR USA
Has thanked: 257 times
Been thanked: 287 times
Contact:

Re: KGS Game Archives: suggestion for improvement

Post by wms »

The links to empty months are there because otherwise I'd have to search a player's whole game list to find which months have games and which don't. The archive pages already are the main load for the web server, this would only make them significantly worse.

I also can't precompute which months people have games because, based on the time zone of the viewer, the games may move from one month to another.

When the server I use gets upgraded I may add the code to check at runtime for which months have games, but that's at least a year off.
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: KGS Game Archives: suggestion for improvement

Post by Li Kao »

wms wrote:I also can't precompute which months people have games because, based on the time zone of the viewer, the games may move from one month to another.

:shock:
I would have used UTC for that without a second thought. Do you mean that even the monthly zip file you can download is different depending on where the user resides? I would have expected that the zip files get cached and are the same for everyone.
Sanity is for the weak.
User avatar
wms
Lives in gote
Posts: 450
Joined: Tue Apr 20, 2010 4:23 pm
GD Posts: 0
KGS: wms
Location: Portland, OR USA
Has thanked: 257 times
Been thanked: 287 times
Contact:

Re: KGS Game Archives: suggestion for improvement

Post by wms »

Well, the date and time of all games shown is in your local time. Anything else would be inconvenient at best. It would be confusing if you saw a game dated July 1 on the June page, so it follows that the month breakdown also has to be localized. And for the zip file to have something different from what you see in the list would, again, be confusing, so yes, when you download a monthly zip file the files are selected based on your local time.

The zip files are not cached, they are generated on the fly. Selecting the files in the database probably takes at least 10 times the CPU power and disk space compared to making the zip file so it would be pointless to cache them. Getting the list of games requires a 5-way join across tables, some of which have over 80,000,000 rows, so this is going to dominate any work done in the archives.
Post Reply