Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: unplayable performance drop from v0.34 to v0.40  (Read 1426 times)

HellTiger

  • Bay Watcher
    • View Profile
unplayable performance drop from v0.34 to v0.40
« on: August 21, 2015, 03:48:38 am »

hello, i have several notebooks, even a netbook where 0.34 was all over playable.
since 0.40 i cant play it on those notebooks anymore. one system specs are pentium dual-core cpu, t4300@2.10ghz,2.10ghz; 4gb ram. now with masterwork i can work around some how, but i disable quite a lot things like weather and use very very small isle.
any info about this? will this be fixed?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #1 on: August 21, 2015, 04:27:42 am »

FPS performance is a constant issue and there are several tips on the wiki for improving it.
I think the main ones are:
- Pocket world
- Short history
- Cull historical figures
- Disable weather
- Disable temperature (and temporarily enable it when dealing with magma, or the hot surfaces will never cool).
- Keep the number of trees down
- Keep the number of Z levels above ground down to fight the FPS drop caused by graphical effects when using depth (also reduces the risk of camping invaders who cannot find your entrance).
- Small embark. The standard 3*3 works for a modern stationary machine, but you might want to go for 2*2 on a laptop. Note that candy is guaranteed only on 3*3 and above.
- Keep the amount of flowing fluid down.
- Also, on a machine with limited resources, shutting down other applications to free up memory can help, as swapping to disk should have quite a negative effect (and when it happens, a fast disk, e.g. an SSD, helps).
- Multi core has no effect on DF itself, since it's single threaded. If you can lock DF to one core and lock everything else out from that core it could help, but memory bandwidth is probably the biggest issue.

I don't think the performance issues are high on the agenda, however, but they're well known. Chipping away at performance hogs is quite boring, however, and adding functionality without also increasing resource consumption is hard.

I've never tried masterworks, but wouldn't be surprised if it used more resources than the vanilla version.
Logged

HellTiger

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #2 on: August 21, 2015, 04:49:41 am »

thanks for the info!
the thing is, i never had to take care about fps in any way, a big fort drops to 30fps, thats fine.
but if you have very low fps at the game start, its not funny
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #3 on: August 21, 2015, 05:25:00 am »

If it starts at less than 100 it's probably hopeless, as the FPS will drop over time. More fortresses are probably abandoned due to FPS issues than all other issues combined.

A couple of additional things:
- It's said lots of items to display affects FPS, in which case Quantum Stockpiles would help.
- Keep the number of items down by getting rid of old junk. I offload xsocksx and all furniture that isn't masterworks to caravans. Magma can be used, but the crafters get unhappy if worn masterworks are destroyed. Clothing is said to decay fairly quickly in refuse stockpiles, though,  and THAT doesn't make the crafter unhappy...
- Keep the number of critters down. I limit the number of dwarves to 60 from immigration and allow it to rise to 80 as a max. However, you miss out on sieges (except black towers, who don't care. They can arrive the first summer) unless you change the corresponding *_PROGRESS_* parameters, and titan/(semi)megabeast attacks similarly start at 80 unless changed. I think a certain immigration threat also occurs at 80, but I haven't found any parameter for that (and I've never seen it in my reduced pop forts).
- Keeping animals in cages rather than pastures is supposed to help, but they won't reproduce while caged (and obviously, starvation is bad for the health of grazers).
- It's said pathing causes a drain, in which case blocking off unused areas could help
Logged

quandasim

  • Escaped Lunatic
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #4 on: August 21, 2015, 11:08:29 am »

fps death is big problem, i bought new i5 desktop procesor for dwarfen fortress (yes my friends laughed), but still the framerate dropped to 25 fps with siege (i use default settings and right now i have ~ 188 dwarfes). i always choose embark place without river and i close watter wheels canall with draw bridge (but i dont know if this kind of cheated watter tile have negative performance effect). because of fps problems i newer use watterfalls.

i use linux, i dont know if linux df have worse performance than windows df.

i hope df get 64 bit multicore support soon:)
Logged

HellTiger

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #5 on: August 21, 2015, 12:22:40 pm »

ok thanks. but still no one mentioned why there is such huge gap between 0.34 and 0.40. i am the only one with that notice?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #6 on: August 21, 2015, 01:14:45 pm »

Haven't used 0.34, but I assume it's a matter of more stuff. The multi tile trees are supposed to be a big culprit (I spend a fair bit of effort to keep the number of trees down, and have embarked by the ocean for that purpose).

As far as I understand DF is not moving to 64 bit any time soon, and that's partially because there isn't really any performance to gain from it. Being able to address more memory basically just means you can run larger embarks at a horrendously slow FPS, which can be done now to some extent by patching DF to be able to access 4 GB instead of 2. Multi threading could do a lot to speed things up on multi core machines, but retrofitting a single threaded program to multi threaded usually carries with it a huge headache in the form of race condition bugs and multiple access data corruption.

It wouldn't have been that much harder to build DF multi threaded if it was designed for it from the start (basically make sure all data stores are protected from multiple access at a suitable granularity and decide which actions can be done in any order and which ones cannot (it probably doesn't matter if you decay regular wear on clothing before or after they are subjected to some effect, such as fire, as long as you handle destruction of it properly, but if you're not careful you can end up with a cave-in towards a flying FB moving upwards passing each other by because nothing was in the destination tile when it was checked).
Logged

Deboche

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #7 on: August 22, 2015, 01:48:48 pm »

Another thing I've noticed affects FPS is deaths. Apparently, the more things die the worse it gets which screws up your gathering of meat, goblinite, leather and bones, at least. I used to make bone crafts to sell but I switched to selling meals because of that. Also, meals are way more valuable and practical.
Logged

deathunter

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #8 on: August 24, 2015, 04:58:56 pm »

Hard or not, i think the game is beyond single core performance. On my 3.4ghz rig with 16gb ram im down to 22 fps on a ~100 Dorf fort. when i started consuming this infesting game such performance drops didnt occur. At least not for the mentioned fort. It is not even 10 years old...
Logged

Rogtuok

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #9 on: August 28, 2015, 09:29:22 am »

i do agree that the game prity quickly gets unplayable due to FPS drop . and i do have quite a good comp
Logged

Witty

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #10 on: August 28, 2015, 08:42:14 pm »

There was definitely a huge drop in FPS life from .34 to .40. Although all the new stuff certainly puts a burden on things - but from what I've read it seems that the major cause of such quick FPS death is possibly tied with a select few issues. The code for the new trees is apparently very unoptimized, and causes major lag. I've also heard that, due to some mostly unknown issue, retiring and then unretiring your fort can potentially fix FPS issues.
Logged
Quote from: Toady One
I understand that it is disappointing when a dwarf makes a spiked loincloth instead of an axe.

taptap

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #11 on: August 30, 2015, 03:36:37 am »

If it gets fixed then realistically only in a version introducing new fps eating game mechanics.

Disabling caravans helps to stop the seasonal fps drop from the huge caravans in lategame (I have a 60+ years fort), they are as much a pathing/fps issue as sieges imo.

A lot of the fps advice is pathing related in disguise (quantum stockpiles generate less jobs = less pathing), a few more:

Reducing number of caverns may help some too.
Flat worlds instead of deep worlds may help as well. (Again pathing related when you actually develop vertically.)
Compact fort instead of spread out fort.
Process invaders in a cleaning friendly manner.
Use traffic designations.

Best method against trees:

Desert or glacier embark.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #12 on: August 30, 2015, 04:24:44 am »

If there is going to be a radical FPS dealing effort I would expect that to contain very little in new contents, as conversion to multi threading is likely to be a rather substantial effort with a significant mopping up phase to take care of bugs introduced. lesser, more isolated efforts (such as optimizing tree growing) would likely be done together with new contents, though.

Oceans are also good against trees. My current embark strategy is to embark in completely flat terrain where one tile is sparsely wooded and the rest is treeless wasteland or ocean. The ocean also has the advantage that there is less room for incompetent invaders to drift aimlessly without being able to find your fortress.
Logged

Ghills

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #13 on: August 30, 2015, 07:34:35 pm »

I use DFHack to clean scattered items and contaminants, set up quantum stockpile and destroy dumped items.  In lategame I use fastdwarf so dwarfs teleport and complete jobs quickly. It's the only way to manage sometimes.

The mods that reduce the number of item types supposedly help with FPS. Never tested it.
Logged
I AM POINTY DEATH INCARNATE
Ye know, being an usurper overseer gone mad with power isn't too bad. It's honestly not that different from being a normal overseer.
To summarize:
They do an epic face. If that fails, they beat said object to death with their beard.

Deboche

  • Bay Watcher
    • View Profile
Re: unplayable performance drop from v0.34 to v0.40
« Reply #14 on: August 31, 2015, 01:11:16 am »

If there is going to be a radical FPS dealing effort I would expect that to contain very little in new contents, as conversion to multi threading...
I think this'll be a fish in a fishbowl type situation. Like when you buy a new external HD and sail smoothly for some time then it's back to deleting files. Can you imagine how gigantic and intricate DF would be if all of a latest computer's resources were available?

You'd have a marksdwarf unable to see an enemy through the rain at night, because there's also too much smoke in that area but still able to get a shot through because of the clinking from his breastplate and greaves. But can the shot penetrate? Does the cold make steel easier or harder to pierce?
Logged