51871
DF Gameplay Questions / Re: Random mechanical questions
« on: May 20, 2012, 11:11:25 am »
Maybe you could set it lower, or use it to divert non-children to...
OH GOD WHAT AM I DOING?
OH GOD WHAT AM I DOING?
May 9, 2024: The May '24 Report is up.
News: April 23, 2024: Dwarf Fortress 50.13 has been released.
News: February 4, 2021: Dwarf Fortress Talk #28 has been posted.
News: November 21, 2018: A new Threetoe story has been posted.
Forum Guidelines
Why not? It's still computing.Yes there are cases where small lag adds up, but this isn't one of them.The worst bottleneck on FPS is exactly the metric that performance should be measured against. If it isn't on the same scale, it's not worth optimizing.
That's a slightly too-simplistic view.
Every cause of lag will add up. A hundred things that take a tenth of a second to calculate are just as much a problem as one thing that takes ten seconds to calculate.
Besides, if we're talking about what to optimize first, there's the matter of "low-hanging fruit" - rewriting container types in order to make the lag from huge item counts less noticeable may be much easier and clear up more lag than potentially marginal gains in incremental changes in pathfinding optimization.
I made up a number. Even so, do the math. Each tile mined, assuming for a moment that it's the only non-solid tile in the world, has nine tiles above it that would need to be checked, 25 above those, 49 above those, 81 above those, 121 above those, etc. A mere 10 z-levels underground, you'd be checking hundreds of tiles. That's a significant portion of a second, every time a tile's mined. And that's assuming tiles below and to the sides of the ones mined aren't being checked. So...another half-second of lag, every time a miner mines a tile around the top of the first cavern layer and even more when deeper? Sounds significant.Here's the biggest issues I see: Toady wants a realistic system which is easy to communicate with the player, and a realistic system that doesn't kill FPS.Why would it take a tenth of a second per tile? that'd be extremely slow. Memory access is on the order of nanoseconds, not hundred milliseconds. And with tiles in an array, there is a certain amount of pre-fetching and other CPU optimization that makes it so that accessing a lot of tiles is faster per tile than accessing one tile.
And yes, checking a crapton of tiles every time someone mines something WILL kill FPS faster than the HFS. Even if it only takes mybe a tenth of a second per tile, that's still several seconds of lag once you get deep enough. Several seconds of lag, per tile. That's a ton of lag if you've got multiple miners.