After a couple months of the first version being live, it became apparent that there was an inherent flaw with the PHP code. Every single time the page is loaded, it has to go through the list of users, and retrieve all the Gamertag information from the Duncan McKenzie API. And with more than around 5 users, this quickly maxed out the 30 seconds maximum execution time for the PHP server.
So the new idea was this: the web page gets the user list and gamerscore from a text file on the webserver. This text file is in turn updated by a console program running on a home PC, that updates all the users in the text file every 30 minutes. And that is basically that. If you load the GamerScore leaderboard now, you will notice a HUGE difference in the load time. Instead of 20 to 25 seconds, it now takes around 2 seconds.
Source for both PHP page and console updater available on request.
| Comments |
|
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."
| Next > |
|---|



