Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Does Mined-out Stone Lying Around Really Cause Lag?  (Read 2282 times)

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Does Mined-out Stone Lying Around Really Cause Lag?
« on: October 08, 2009, 01:28:42 am »

Lately various posters have responded to me that having thousands of stones just lying around does appear to cause lag - I assume they believe it is the pathfinding into the newly dug-out areas that causes the problems.

Can I get a confirmation one way or the other?

From personal experience, I've dug out three underground cities, and every time I finished digging out a five z-level hall my overall fps seemed to have dropped even despite things like high traffic areas, and crushing stone via bridge seems to boost fps initially by an average of 8 per three hundred, though the effect eventually dwindles to meaninglessness.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #1 on: October 08, 2009, 01:36:29 am »

Yes.  It's more the sheer number of items than the pathfinding apparently.
Logged

SniHjen

  • Bay Watcher
    • View Profile
    • http://www.youtube.com/user/Hacenten
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #2 on: October 08, 2009, 01:38:37 am »

Here in Dwarf Fortress, dwarfs arn't looking for a job

Instead, jobs are looking for dwarfs.

This means that every single stone lying around is looking for a dwarf to interact with it.


Pre-Post Edit: Ninjaed by Footkerchief, but the answers in that thread are wrong.
Logged
That [Magma] is a bit deep down there, don't you think?
You really aren't thinking like a dwarf.

If you think it is down too far, you move it up until it reaches an acceptable elevation.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #3 on: October 08, 2009, 02:15:04 am »

Instead, jobs are looking for dwarfs.

This means that every single stone lying around is looking for a dwarf to interact with it.

I've seen this said before but never seen any explanation for it?  As kotekzot mentioned in the thread I linked, having lots of items just means it ends up iterating over bigger lists for all kinds of stuff, which is certainly enough to explain the drop by itself.
Logged

Gergination

  • Bay Watcher
  • The world is on fire
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #4 on: October 08, 2009, 03:02:36 am »

Have enough stone (for me it's around 220k) and it will start hard crashing.
Logged
With [SLOW_LEARNER], dwarves probably don't sit around and talk anymore. They just stand in the same corner altogether, staring at each other, sticking their bearded lips out trying to make sounds. And giggling when someone actually says a whole word.

yuhhaur

  • Bay Watcher
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #5 on: October 08, 2009, 03:43:18 am »

Have enough stone (for me it's around 220k) and it will start hard crashing.

That means you need to find a way to convert the stone into others (including air) before it reach the threshold
Logged

shadowclasper

  • Bay Watcher
  • Urist McSpacemarine, AxeDwarf
    • View Profile
    • My Portfolio
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #6 on: October 08, 2009, 03:43:47 am »

Question? Does putting them in a dump pile help at all?
Logged
Project Manager for Towergirls: Subtitle Pending

Ubiq

  • Bay Watcher
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #7 on: October 08, 2009, 04:40:49 am »

Question? Does putting them in a dump pile help at all?

Probably not seeing as how it's still keeping track of each individual stone. Actually, having to keep track of the fact that they're marked as dumped and forbidden might even make it worse than just tracking rocks that are just lying around.

The easiest thing to do is to just atom smash any useless rock or pitch it into a handy chasm so that it's permanently gone. It's not like you can't trade for rock or metals if you need building material.
Logged

Firnagzen

  • Bay Watcher
  • [CURIOUSBEAST_INSANE]
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #8 on: October 08, 2009, 06:11:18 am »

I created an extra reaction: Burn stone.

One stone in, poof. Nothing out.
Logged
Christ, are you dwarves or are you elves? If you think Hell has too many demons, then you kill them till the population reaches an acceptable number.

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #9 on: October 08, 2009, 07:21:05 am »

Thanks for the confirmation. Now I know where to direct the skeptical.

The sad thing is that even building things with them like sky scrapers and Orthanc replicas doesn't take them off the menu.

You could make them into mechanisms and give them to the caravans or something...
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Shakma

  • Bay Watcher
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #10 on: October 08, 2009, 07:41:50 am »

I was lagged enough in one project that I just changed the boiling point to one of the common stones so it would evaporate/boil.  Lost a few items and workshops but FPS got a nice boost. 
Logged

Osmosis Jones

  • Bay Watcher
  • Now with 100% more rotation!
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #11 on: October 08, 2009, 08:15:24 am »

I've found forbidding stones does help with the lag. Took me from unplayable to mildly annoying when I went to the stock screen and forbid my copious stone piles. Having to unforbid every workshop and construction that used the stone was irritating though.
Logged
The Marx generator will produce Engels-waves which should allow the inherently unstable isotope of Leninium to undergo a rapid Stalinisation in mere trockoseconds.

Puck

  • Bay Watcher
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #12 on: October 08, 2009, 08:47:57 am »

First of all, let me say that I dont have any conclusive proof, but here are some thoughts.

If, indeed, every stone is looking to create a hauling job, if you will, then it's just logical it can decrease game speed. If it's just the dwarves creating jobs, a lot of stones could be problematic IF every hauler decides to check every available item. It should not play a role if the looking stops after the first appropriate item to be hauled is found.

Forbidding them should alleviate the problem in any case a bit, since a flag that makes all the possible hauling jobs not even consider that certain stone should be less CPU intensive than every other possible option.

However it's handled, a lot of stone probably tax the ram. I dont know how much stones you need for that to apply, but a wild guess says it's "a fucking metric shittonne".

And last but not least a little story:

I had my dwarves live in the soil layers and was preparing the real fortress. The main level was dug out, full of stones, so I designated the approximate center tile as dump zone and just let them dump all the stones in that level on that tile. The dump zone was in the future dining hall, accessible by 4 entrances, each of them 2 tiles wide (door wall door). Framerate around 30.

As a little experiment I dug out the wall tile of the entrances. Framerate climbed to 60.

So... pathfinding can be a problem without you noticing it. For instance assume you have some exploratory mining shafts that are 1 tile wide. Or future aquaeducts that are 1 tile wide. There are some rocks lying around there. Now you may not even have a dump zone or any dump designation, you may not even have a stone stockpile. But you PROBABLY will have some stone using jobs queued - I guess you guys see what I'm getting at....

Well, either way, I suffer from a mild case of OCD, and I tend to clear out my maps. (Hence the design of my waste disposal system in my sig) I can say with a considerable certainty that having less items on a map increases game speed. Especially as you get more dwarves all the "Might there be something that needs hauling" seems to take more CPU time. Coming to think of it... the "check for hauling jobs" routine, however it works, probably contains a bit of pathfinding anyway, no matter what.

So, tl;dr.... I think a gazillion of items lying around somewhat taxes gamespeed. But with only a handful of dwarves you will barely notice it. Once there are more guys running around, the effect becomes more and more noticeable.

Solution ? Train catapult users or turn the rocks into stonecrafts and use my automated waste disposal system! (stone crafts float  ;))

edit: another way to put it, since I feel i didnt make quite clear what I mean: a lot of items lying around probably make any possible shortcomings of the pathfinding more noticeable.
« Last Edit: October 08, 2009, 08:51:18 am by Puck »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #13 on: October 08, 2009, 08:55:02 am »

use my automated waste disposal system! (stone crafts float  ;))

There's actually a bug in 40d with water pushing items around where it causes items to become completely invisible but still actually remain in their location (Z-Stocks will let you zoom to them, but you won't actually see anything there). If you were to use d-b-d within your P.O.R.N.S.T.A.R.S. upper chamber after flushing away some items, you would probably find your dwarves rushing in and picking up items out of nowhere - I've done the same thing after flooding my entrance bridge with magma during a siege and then retracting it to get rid of the magma, where using d-b-c to reclaim the area makes my dwarves run onto the bridge and gather up a bunch of metal items that had apparently gotten stuck floating in midair.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Puck

  • Bay Watcher
    • View Profile
Re: Does Mined-out Stone Lying Around Really Cause Lag?
« Reply #14 on: October 08, 2009, 09:03:43 am »

Interesting, I will try that. You can't blame me for noticing that  ;D

However, it's likely to be fixed sooner or later.

For instance there was another bug involved: if you drop items on a raised bridge, from above, they land on the created floortiles. If you lowered that bridge, items would float. The bug seems fixed now. It would not a problem with P.O.R.N.S.T.A.R.S. -seriously what was I thinking when coming up with that name- anyway, since the items can only fall down when the smashy bridge is lowered. Unless you pull - r.

Coming to think of it... the thing you described reminds me of that old bug... Have you tried, after the magma was gone, to retract and extend the bridge a few times? I used to use retracting bridges to remind floating items its probably time to fall down now....
« Last Edit: October 08, 2009, 09:06:57 am by Puck »
Logged
Pages: [1] 2