Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [.33g]Mysterious Lag  (Read 526 times)

Noctis

  • Bay Watcher
    • View Profile
[.33g]Mysterious Lag
« on: January 03, 2008, 02:01:00 pm »

Alright, I been building a sweet new fortress a few days among some mountains within a grand haunted/sinister glacier. It's situated right in the passage a ever-frozen brook calls it's canyon of sorts. It has everything: magma, a underground river, adamantine, obsidian, marble, a sedimentary layer etc. Well, it lacks trees, sand, a soil layer and warmth. Anyway... 2 years in and I've started experiencing strange lags. With temperature my average FPS is ca 55, without almost 100(must be the glacier vs. magma thing), but since its lagging the FPS drop quite a bit. Usually its steady at ca 25-30 FPS, but sometimes it falls as low as 10 FPS regardless of the temperature settings. I've only got 38 dwarfs, no pets and I've even killed off all the other creatures in hopes of getting rid of the lag. I've tried a lot of the init options and even tried modifying my already heavily modified raws, but nothing has helped. I'm running DF on normal priority so it can't be the system thats lagging. I can't seem to relate anything to the lag. At one point I came to the conclusion that dumping stuff into the chasm might have caused it, but I stopped all my dwarfs from doing it and it was still laggy. Only thing that has helped is making all my dwarfs stay inside and idle, so my dwarfs must've caused it. Maybe its the pathfinding. The lag remind me of the 33a pathfinding lag.

Also as a side note: I noticed a hole within a cliff at the lowest level and behold. Within that large hole was two more holes, 1x1 in size, containing water and... Olmen, mudmen, lizardmen and a giant frog. I guess it's a failed cave lake, but does it have to have monsters, cave spiders and olms crawling all over the place making a newfound outpost's life difficult?

- Noctis

Logged
Noctis, Freebooter cancels Get a Life: DF sighted on the Cyberwaters.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: [.33g]Mysterious Lag
« Reply #1 on: January 03, 2008, 05:49:00 pm »

If you delete the errorlog.txt (if it exists), and then load, does it get any messages after you load?  It'll report some of the serious pathing problems.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Fedor

  • Bay Watcher
    • View Profile
Re: [.33g]Mysterious Lag
« Reply #2 on: January 03, 2008, 11:34:00 pm »

The suggestions on This page may help you, particularly the comments on corridors and maybe weather.  We DO need more information on how to help out the pathfinding code...
Logged
Fedor Andreev is a citizen of the Federated Endeavor. He is a member of the Wandering Minds.

Noctis

  • Bay Watcher
    • View Profile
Re: [.33g]Mysterious Lag
« Reply #3 on: January 04, 2008, 05:15:00 am »

The errorlog didn't reveal anything that I think is of interest. It's simply spammed with few lines of
Unrecognized Tile Page Token: CREATURE
Unrecognized Tile Page Token: DEFAULT
Unrecognized Tile Page Token: CHILD
Unrecognized Tile Page Token: ZOMBIE
Unrecognized Tile Page Token: SKELETON
and at the very bottom I got one pathfinding error relating to one worker not finding a path to a stockpile. I played over 2 in-game months to get that one error, at the same time there must've been hundreds of lags.
Regarding to the "Maximizing framerate" article...
Atm, I got weather off, temp. off, artifacts off, everything else on. Most corridors are either 2 or 3 squares, with pillar in the middle, wide, effectively they both have the same traffic capacity. I've tried getting rid of the bottlenecks, pillars and widen the hallways, but it had no effect. In fact, most fortresses can't benefit from corridors wider than 2-3 squares, since dwarfs will always walk the same path as all others heading in the same direction regardless of how crowded it is. Usually the dwarfs going and those who are coming walk different sides of the corridor, but thats about it. A good planner can take advantage of corridors 3, 4 or even 5 squares wide by placing obstacles, exits and entrances the right way, but it requires a lot of planning and space and pays off only if theres truly massive traffic in the area. If I'm building a very compact fortress with short hauling paths, I simply build a lot of alternative paths, so that different haulers take different paths. However, if the paths are very long then I simply go with only a few 2-3 square corridors. There's simply no point in making wider corridors. And corridors only affected the framerate in .33a, when every time a path filled up the dwarfs would try to calculate a new path and that created lag, which I mentioned in my previous post as the "33a pathfinding lag".
Anyway, back to the topic. My embark rectangle was 3-4 in with and some 7-9 squares in length and one my corridors goes from the middle of the map to the upper right corner of the map. The destination for the corridor lies in a diagonal path, but the corridor has no diagonal parts, making it even longer and it seems that the lag is caused every time a worker tries to find a path through that corridor. May it be that the pathing code has a distance at which it tries to recalculate the path? The distance itself shouldn't be much of a problem.
Heck, may-be it's the government trying to get me!

- Noctis

Logged
Noctis, Freebooter cancels Get a Life: DF sighted on the Cyberwaters.