Opened 11 years ago

Closed 10 years ago

#1830 closed defect (wontfix)

Civ Center bottleneck?

Reported by: InvalidAddress Owned by:
Priority: Should Have Milestone:
Component: UI & Simulation Keywords:
Cc: wraitii, mimo Patch:

Description

I'm not quite sure if this has been patched yet or not, as this was experienced in an alpha build from 12 January 2013. Also, I apologise in advance for the length.

The scenario:

5 Civilizations (all random)
1 Player
4 AI (Aegis)
Normal sized map (4 players) (random)
No population cap

After several hours of play (over the span of a week or so) the game had slowed to a crawl. I had initially believed it to be my old computer having to deal with several hundred units, but after narrowing the game down to myself and two other AIs (one with nearly 1000 units), the speed did not visibly improve. Even after a fairly large battle in which I dealt a sizable blow to the larger AI's army, there was no difference.

Eventually, I destroyed one of the larger AI's civ centers and the game sped up drastically, practically to new scenario speeds. At this point in the game 23 civ centers had been built (in addition to the 5 original), I had destroyed 14, and of those remaining 7 were mine.

I honestly don't know if the bottleneck had something to do with the number of civ centers being controlled by the AI, or if a garbage collector suddenly decided to clean up all the units slain previously (I don't know how quickly units are removed from memory...)

Attachments (2)

quicksave-0086.0adsave (495.6 KB ) - added by InvalidAddress 11 years ago.
last save to experience slowdown
quicksave-0087.0adsave (250.0 KB ) - added by InvalidAddress 11 years ago.
slowdown suddenly gone

Download all attachments as: .zip

Change History (9)

comment:1 by historic_bruno, 11 years ago

Cc: wraitii added
Keywords: civ center bottleneck slowdown AI removed

Do you find a similar problem if playing against qBot? When you experience the slowdowns, try saving the profiler data with Shift+F11, it will be saved to the game's log folder (see GameDataPaths)

Can you save the game at the point where it slows down and attach that saved game here?

by InvalidAddress, 11 years ago

Attachment: quicksave-0086.0adsave added

last save to experience slowdown

by InvalidAddress, 11 years ago

Attachment: quicksave-0087.0adsave added

slowdown suddenly gone

comment:2 by InvalidAddress, 11 years ago

I haven't used qBot in a while, so I don't know. I'll run a quick game and see what happens. In the mean time, I've uploaded some save files from the session in question. The first is late in the game, where slowdown was inhibiting gameplay, the second is where the slowdown miraculously vanishes. In addition, here is a much earlier save file, where the slowdown is becoming much more evident. I couldn't attach it directly as it had exceeded the bug tracker's file size limit.

http://www.sendspace.com/file/zyz943

comment:3 by wraitii, 11 years ago

I'm interested in the results of this. This could be linked to the GC, as the GC only removes stuffs from memory if they are no longer referenced by anything, and there is a possibility that a CC could have, in its "metadata", a reference to some units, or through some weirdness cause it. To check if the GC is the culprit, you can check the AI memory usage (using the profiler, iirc assigned to F11). If there's a sudden drop in memory usage when the game resumes a normal speed, then it's likely that.

I'm not really seeing anything in Aegis that could lag so much otherwise with just one CC, except perhaps the Queue Manager, which sometimes gets clogged up.

comment:4 by InvalidAddress, 11 years ago

Tried again with another random session.

4 Civilizations
1 Player
3 AI (all qBot)
Medium map (3 Players)(random)
Default pop. cap (300)

Didn't notice any slowdown for a while, and when I did it was gradual enough for me to assume it was just my computer struggling with the units. Again though, when I destroyed the last civ center, the game suddenly sped up. I should note that qBot wasn't nearly as aggressive as Aegis was last time, and only one additional civ center had been built by the AI throughout the session.

I can post these saves as well, if desired. I'll try again and keep the profiler up this time.

Also, before this last session, I had updated the game to whatever's most recent in the PPA. So, it still is something of a problem.

comment:5 by wraitii, 10 years ago

Cc: mimo added

comment:6 by Stan, 10 years ago

Is it Fixed in Petra ?

comment:7 by mimo, 10 years ago

Milestone: Backlog
Resolution: wontfix
Status: newclosed

I can't see how such slowdown could be directly connected to the civCenter. Most often, there were due to units trying to reach an inaccessible target. (Most of) these cases are fixed in Petra. So Closing this ticket as wontfix because aegis is no more supported.

Note: See TracTickets for help on using tickets.