Create game process is slow

User contributed suggestions that have been implemented on Art of War
User avatar
e_i_pi
Posts: 1118
Joined: Sat Feb 14, 2009 4:38 pm

Create game process is slow

Postby e_i_pi » Sun Feb 15, 2015 8:59 am

Since the deployment of v1.0.0, creating game times has slowed down. Need to diagnose where it is slow and either speed up the server side code or apply appropriate indexes to the database.


User avatar
e_i_pi
Posts: 1118
Joined: Sat Feb 14, 2009 4:38 pm

Re: Create game process is slow

Postby e_i_pi » Sun Feb 15, 2015 12:55 pm

This is a hard one to fix to the point that game creation is near instantaneous. When you create a game, the basic profile of the game data object needs to be created, which is a reasonably heavy overhead. I've moved Map, Era and Scenario data to a cache table, so you don't cop that as an overhead, but the game init data still needs to be created before the recruiting screen can be displayed. My benchmarks shows that create game takes about 2-8 seconds depending on the game type, but once it's created then navigating to it takes about 2-6 seconds, or around 30-50% faster. This is something that I worked hard on to optimise in v1.0.0. Perhaps more work needs to be done, but unless the game creation time goes over 10 seconds, I'm not too worried about it - the amount of work that the server does on create game is the hardest work it ever does.

In any case, I've chucked a couple more indexes on appropriate database tables to relieve the stress on the database a little, but we're talking about 50-100ms improvement in load times, which is barely noticeable.

Closing this one for now. If the game creation speed goes upwards with more site activity, I'll look into it again, but I'm not overly concerned by current load times.


Return to “Implemented Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest