Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Low FPS even when paused?  (Read 870 times)

baldamundo

  • Bay Watcher
    • View Profile
Low FPS even when paused?
« on: December 18, 2016, 01:48:42 pm »


Playing on Meph's Masterwork mod for 43.03 as an Orc fort, with the Meph tileset and TWBT enabled.

To start with, everything was going great and super speedy, 120 FPS or so (I think it's capped there). Fortress developed, I dug out more, got more orcs FPS gradually lowered, with occasional more extreme lagspikes that didn't last long. But even in the extreme lag spikes, while paused the FPS would shoot back up to 120 until unpaused.

At some point, with no obvious trigger, FPS collapsed to about 12 and stayed extremely low even when paused (would sometimes gain a few back, but never exceeding 20). It's not improved since, even hours later. For a while now it's been stuck anywhere between 8-15 FPS.

This happened when my population was at about 30, I think. There wasn't any obvious big engineering work to trigger it, although it might have overlapped with some of my workshop and stockpile space coming online. Currently my population is 53, animals ~40 (majority of them pastured or caged), and normally between 3 and 10 visitors/wild animals.

Damning the river and the waterfall made no significant difference to FPS (maybe increased it by two-three frames max). Designating large open spaces inside the fortress as low priority and creating normal and high priority highways across made no significant difference. Assigning 90% of the fortress to the military and stationing them in the hall made no difference. Shutting all the exits to the outside world made no difference. Sealing off the caverns made no difference. (I think) I have no doors that are pet impassable.

Does anyone have any idea what could be causing my lag here? I've got plenty of spare CPU and RAM capacity so I presume it's not my computer being over-stretched. Not sure what else to try other than maybe disabling temperature?

And is it normal for FPS to stay low even when the game's paused?
Logged

Gwolfski

  • Bay Watcher
  • Strawberries!
    • View Profile
    • ignore pls!
Re: Low FPS even when paused?
« Reply #1 on: December 18, 2016, 04:27:01 pm »

You did restart the game, right? If so, try restarting your whole computer. I had a similar problem and that fixed it for me, also, since this is masterwork, it'd be better over there -> http://www.bay12forums.com/smf/index.php?board=24.0
Logged
Eventually when you go far enough the insane start becoming the sane

Loci

  • Bay Watcher
    • View Profile
Re: Low FPS even when paused?
« Reply #2 on: December 18, 2016, 06:03:36 pm »

Does anyone have any idea what could be causing my lag here?

The wiki has an extensive list of potential problems.

And is it normal for FPS to stay low even when the game's paused?

The game still redraws the screen while paused. Some of the display-drawing code (for trees, in particular) is ... highly inefficient. I've previously noted a 30-40 fps improvement by moving the display window to a treeless z-level. Add in the bug where even "sparse" trees grow into a veritable jungle and viewing the surface becomes a real pain. You can clear-cut the trees for a temporary improvement, but my recommended long-term solution is to embark in a location where only one embark tile has trees to limit the amount of overgrowth.

Logged

mikekchar

  • Bay Watcher
    • View Profile
Re: Low FPS even when paused?
« Reply #3 on: December 18, 2016, 07:27:55 pm »

I play in jungles all the time and never have problems with FPS when paused.  Remember that movies are 24 FPS, so scrolling around the screen should be lag free at that level (even if it might not be buttery smooth).  My guess is that you are actually running out of memory.  Especially if you are on Windows, this can create massive problems because it has an overactive swapper (it moves things off to disk too quickly IMHO).  It's been years, so I can't remember how to check how much memory you are using up but there is a utility somewhere.  Some other things to check is to move to a different window (like a web browser) and do some things for 5 minutes or so.  If, when you switch back to DF, there is a delay before you can do things, then it is almost certainly swapping it off to disk.  If you have physical disks (rather than SSDs), listen to them and if they are constantly running while you play DF, then this is likely your problem.

If that's the case, I would check to see what's using up the memory (it might not be DF).  Run your virus checker to make sure there isn't something else going funny as well.  If it is DF, then probably atom smashing things is the way to go.  I don't know how masterwork works, but cleaning up your unit list would probably help (I think there is a utility to do it in DFHack, or you can retire and unretire your fortress).  If your map *has* become overgrown, cutting down some trees and atom smashing the wood might free up some memory as well.  But I'm going to bet that it is probably the unit list that is causing the issue.
Logged

baldamundo

  • Bay Watcher
    • View Profile
Re: Low FPS even when paused?
« Reply #4 on: December 19, 2016, 06:53:14 am »

Moving to a treeless z-level only gave me a couple of frames improvement.

My guess is that you are actually running out of memory
According to task manager, it's using about 2,700MB of RAM, which is apparently 30% or so of my total capacity. And even with Firefox and such running it doesn't go as high as 50% usage. CPU and disk usage are even lower.


Have now also tried disabling temperature and weather, exterminating all pets, monsters, wildlife and visitors, clearing the unit list with DFHack, locking everyone inside the fortress and exterminating all but one orc, and even after all that I still only reached as high as about 18 FPS  ???
Logged

baldamundo

  • Bay Watcher
    • View Profile
Re: Low FPS even when paused?
« Reply #5 on: December 19, 2016, 07:35:14 am »

Okay, so retiring and unretiring fixed the FPS issue (now 150 FPS when paused, around 40FPS unpaused)...buuuuut...for some reason it treated it as if it was a reclamation, so now I have control of 7 new orcs while my old population are treated as an ambush (it says they're hostile but they don't seem to actually be).

I have backups from before the retiring, so any ideas how to avoid this? I could use DFHack to takeover the existing population, but I feel like that could set myself up for hella bugs further down the line.

EDIT: Fixed it! Embark Anywhere was confusing things http://www.bay12forums.com/smf/index.php?topic=158865.0
« Last Edit: December 19, 2016, 07:51:23 am by baldamundo »
Logged