torsdag 16 juli 2009

Recent Changes Behind The Scenes

Some major structural changes has been made recently. The two most important were moving most of the log, and the opinions, into memory. Previously the log (all creep actions) and the creep opinions were fetched from the MySQL database. However, both these tables were becoming extremely large, and they were crashing more and more often (MyISAM). When I finally moved them to memory instead, the performance boost was fantastic. No more table crashes since this change. And the speed was improved many many times. Opinions and log state are now saved in .dat files instead, making world startup times very fast as well. Overall these changes has made the world much more stable.

The last change with opinions was a limitation. Opinions are growing at a very high rate when all creeps eventually will have opinions about all creeps (and gods). The limit now is that a creep's memory is not infinite. They will be able to remember a limited number of creeps - and when that memory is "full" they will forget the one they met the longest time ago. As for gods, there is no number limit, but a time limit. For now they forget gods after 6 months. Every touch will restart the 6 months period though.

Inga kommentarer:

Skicka en kommentar