Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help in understanding what's important for DF FPS  (Read 1879 times)

Deus_Vult

  • Bay Watcher
    • View Profile
Help in understanding what's important for DF FPS
« on: December 25, 2016, 11:11:10 pm »

Hi, fellow overlords.
Question - can you explain to me what's wrong in my machine so that FPS collapses to 20 when I reach population of 50 + visitors and just a few animals, and even have Masterwork's limited leather/meat mod on, no flowing liquids, no caverns opened, nothing! And even the world I generated is small with short history.
Why this could be so?

Here are my machine specifications:

Spoiler (click to show/hide)

System is x64, Windows 10
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #1 on: December 26, 2016, 12:21:06 am »

Its mostly due to the number of revealed tiles, and the number of discrete objects. Discrete objects, include every piece of clothing, every stone, every tree, the splatter layers.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #2 on: December 26, 2016, 05:24:31 am »

I beg to differ.  Although the above can have a significant impact on FPS, particularly in large and old forts, in my experience the major FPS killer is pathing. 

Significant incidents can be caused by creatures stuck in trees, packs of flying critters on the map, etc., even if hidden, and is confirmed by deep fun stuff. 

Repeated problems with low FPS can come from fortress design.  Minimize accessible areas and limit ways to get from point A to point B - one is best - and keep stairways small, 2x2 creates (at a quick guesstimate) something like one third of the FPS drain that 3x3 does, for example.

Beyond the things mentioned in the OP turning weather and temperature off can help.

BTW the spoiler is empty for me...
Logged

MrWiggles

  • Bay Watcher
  • Doubt Everything
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #3 on: December 26, 2016, 05:42:14 am »

Its revealed tiles and items. Its why one map tile forts do much better, fps wise.
Logged
Doesn't like running from bears = clearly isn't an Eastern European
I'm Making a Mush! Navitas: City Limits ~ Inspired by Dresden Files and SCP.
http://www.bay12forums.com/smf/index.php?topic=113699.msg3470055#msg3470055
http://www.tf2items.com/id/MisterWigggles666#

NullForceOmega

  • Bay Watcher
  • But, really, it's divine. Divinely tiresome.
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #4 on: December 26, 2016, 01:13:58 pm »

Absolutely everything impacts your FPS, weather, temperature, number of dwarves (due to pathing, aging, weight gain/lost, interactions, etc.), animals (for the same reasons), objects, engravings, images on objects, wear states, tree growth, plant growth in general, checks for new entities entering the map, corpses, the list of dead units, and on and on and on.  This is why every fortress is doomed to FPS death at the moment of creation, every single step taken to 'preserve' your FPS just delays the inevitable end.
Logged
Grey morality is for people who wish to avoid retribution for misdeeds.

NullForceOmega is an immortal neanderthal who has been an amnesiac for the past 5000 years.

Skorpion

  • Bay Watcher
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #5 on: December 26, 2016, 04:50:33 pm »

Pathing. Stop with the single tile wide corridors. Two tiles minimum. Keep freed animals to a minimum.
Fluid flow. Eliminate it wherever possible.
Logged
The *large serrated steel disk* strikes the Raven in the head, tearing apart the muscle, shattering the skull, and tearing apart the brain!
A tendon in the skull has been torn!
The Raven has been knocked unconcious!

Elves do it in trees. Humans do it in wooden structures. Dwarves? Dwarves do it underground. With magma.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #6 on: December 27, 2016, 07:37:56 am »

How many visitors do you have? Did you embark in an area with lot of trees? (Matters with your embark size, but can be difference between 85 and 25 fps for empty desert vs evil shrubland with a brook when on 16x16).

Creatures also drain FPS just by living, even if restricted to solitary 1x2 boxes.

I'd also check that you don't have any pet-blocking/dwarf-passable doors.

arbarbonif

  • Bay Watcher
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #7 on: December 28, 2016, 11:36:00 am »

One thing I have noticed recently is that the number of tiles displayed on the screen is a big factor as well.  I can go from 30 to 150 just by zooming in on the map.  I'm assuming that is the same thing that makes multilevel TWBT slower.
Logged

smithist

  • Bay Watcher
  • ~freakish wriggling~
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #8 on: December 28, 2016, 12:07:04 pm »

Check this wiki page. We're all basically just cribbing from it anyway. Lately I've been using the DFhack command "autodump destroy" incredibly liberally.

I'll add my biggest considerations, though, in roughly their order of importance:

embark size - I think this trumps just about everything else. More space means more of everything else. I do mostly 1x3s these days.
population - more dwarves with more crap doing more things. It hurts! My pop cap is never above 140 (just enough to become a mountain home). Sometimes I'll tweak "strict pop cap" depending on my ratio of dwarves:babies:outsiders. If you don't care about becoming the capital, I say go much lower. IMO there isn't a lot 140 dwarves can do that 50 can't.
activity on surface - a glacier will be better than a dense forest. I imagine this is less important the smaller your embark, but still relevant.
flowing water on surface - as much as I love a natural waterfall or a lovely brook, I've decided it's not worth the cost.
fort design/pathfinding - use traffic designations and keep the forts relatively simple

If you wanna cheat (just a little) or alter the game:
temp/weather - turning them off can be huge. A glacier with no weather or temp calcs is the best possible fps embark I've found. Obviously it makes the glacier easier to not have those but I've already proven to myself I can survive a vanilla glacier
items - destroy everything you don't need! This can be done without commands (just throw it into a volcano!) but I can't say enough good things about DFhack's "autodump destroy" command. "clean all" also helps and removes gross vomit as a bonus.
« Last Edit: December 28, 2016, 12:33:54 pm by smithist »
Logged

Thisfox

  • Bay Watcher
  • Vixen.
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #9 on: December 28, 2016, 06:53:45 pm »

Discrete objects can have effect, but pathing is the big one.

Avoid many alternate routes to items, if they're almost the same similar distance on either path, it seems to take longer to calculate which one is slightly shorter. All hallways should be at least 2 tiles wide, so that dwarves can pass easily. You can put double doors in a two tile wide corridor. Four-tile-wide corridors are even better where you can manage them. Avoid single tile staircases, as dwarves have to pass there too. I try to keep my (only, single, central) staircase at least 2x2 wide, and I have no other way for the dwarves to change z levels, so they don't get caught going in a dogleg, or a long loop, due to traffic issues.

Keep animals tethered, walled in, and kept in their pastures. Doors that are locked to animals but not dwarves will make animals eat up fps trying to work out why they can't get through the damn door, so avoid those where you can.

Avoid reanimation biomes, as these can cause fps issues when everything with live-origin starts reanimating, even if it's in unrevealed tile space. Hidden cavern zombie multiplication causing fps issues has been reported by many people, even if I've never noticed it personally.

And also? Set a population cap that you can live with. 40, 70, even 90 dwarves is faster than 200 dwarves, even though it feels like you'd have more workers that way.
Logged
Mules gotta spleen. Dwarfs gotta eat.
Thisfox likes aquifers, olivine, Forgotten Beasts for their imagination, & dorfs for their stupidity. She prefers to consume gin & tonic. She absolutely detests Facebook.
"Urist McMason died out of pure spite to make you wonder why he was suddenly dead"
Oh god... Plump Helmet Man Mimes!

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Help in understanding what's important for DF FPS
« Reply #10 on: December 29, 2016, 04:50:12 am »

About that pathing/staircase advice, iirc A* doesn't perform well with obstacles - it tries to get to the location of the item "as the bird flies" and spreads around each obstacle. Which is why more spreading room and multiple paths, even dead-ends to get lost in can cause additional weight....

I've read a suggestion that 2D fort would be more efficient in pathing due avoiding the huge obstacle/bottle of z-levels, as well as suggestion that fort entirely composed of staircases (only known example of this being itg's floating skyfort, but that map had a billion things going on) being efficient for allowing seeking quickest path to target.

Well, the idea is certainly on my backburner to try out, if just to understand jobs and dwarven life better. Can watch them all at once like that :P