2019-11-15 Server Load - Printable Version +- Hazeron Forums (https://hazeron.com/mybb) +-- Forum: Shores of Hazeron (https://hazeron.com/mybb/forumdisplay.php?fid=1) +--- Forum: Updates (https://hazeron.com/mybb/forumdisplay.php?fid=11) +--- Thread: 2019-11-15 Server Load (/showthread.php?tid=2040) |
2019-11-15 Server Load - Haxus - 11-15-2019 Server Load Server load has grown steadily worse for days, maybe weeks. Some investigating took me to a small city that was taking almost five minutes to prepare its city report. The mystery grew deeper when the lag was caused by consolidating the inventories of the various buildings in the city into one inventory for the city report. How could that take minutes? Digging deeper showed that some of the buildings were storing lists of nearly 100,000 different items. That is different items, not counts. Counts of items are just numbers on the items. Differences arise from items that cannot be stacked with other items. The problem was hidden by the way the inventory is sorted for the city report. The sorting process expected the list items to have unique names. They didn't. I fixed the city report but that fix will not appear until the next client update, not needed for this server fix. An error was found in an operator== override for old style DNA. The error was introduced recently when a pure base class was implemented for handling old and new DNA uniformly. The solution fixes inventory lists as they are loaded. You don't have to do anything. Then we'll find the next most greedy bit of code, eating up CPU time needlessly. Aspiring programmers should always remember; make it part of your DNA. No CPU instruction is free. Obsolete Items Old style cities used to throw away obsolete items. New style cities never throw away obsolete items. This results in long lists of items with slightly different qualities. New style cities now discard obsolete items when the city report is created. This should further reduce those big lists of inventory items in cities. Buildings individually maintain their own inventories and residents. Buildings individually decide which of their inventory items are obsolete. The city accumulates all items from all buildings, so the city report may show items that would be considered obsolete if all of the items were considered together. What makes an item obsolete?
RE: 2015-11-15 Server Load - jakbruce2012 - 11-16-2019 Good find. Is there a way to set a warehouse to gather only specific quality items? If I have multiple resource streams (or rather when I have multiple resource streams) I would like to be able keep them, in separate warehouses if necessary to preserve them. |