Victim of my own success

Monday, October 8, 2007

En Garde is getting great play, I can see people playing it all day long.

And it's killing my web server.

Every time a game is play, it recalculates the rankings. I can see in my server logs it's taking upwards of ten seconds to do that calculation. That's ten seconds where all my vendors are frozen. And you'll notice it takes at least ten seconds for your new score to be reflected on the board.

Partly it's because I'm running the server on a cheap account, and partly it's because the code isn't as optimized as it could be. So I'll work on the latter.

UPDATE: I've got it down to about five and a half seconds now, which I'll have to live with. Optimizing it further will be quite a bit of work.


Post a Comment