Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0003963Dwarf FortressWorld Generation -- Generalpublic2011-02-16 13:102012-03-07 08:04
Toady One 
0003963: World Generation too slow
World Generation for worlds small or large are taking a lot more time than in the previous version. About 10 minutes with a Core i5 with 2.27 ghz!
Generate a Medium World.
No tags attached.
related to 0005269resolved Toady One Worldgen has alarmingly high rate of monster rampages and extremely high monarch mortality rate 
has duplicate 0005096resolved Footkerchief World Gen takes a long time 
has duplicate 0005058resolved Footkerchief Never Ending(and constant freezing) World Generation 
has duplicate 0005344resolved Footkerchief World Generation effectively halts or slows down to unacceptable levels for long histories 
Issue History
2011-02-16 13:10thvazNew Issue
2011-02-16 13:23QuietustNote Added: 0015128
2011-02-17 09:35Khym ChanurIssue Monitored: Khym Chanur
2011-02-17 17:33cephaloNote Added: 0015218
2011-03-06 05:20thvazTag Attached: Intentional/Expected?
2011-03-06 05:20thvazTag Attached: Needs Confirmation
2011-07-31 23:03asmodaiNote Added: 0018401
2011-07-31 23:05asmodaiNote Edited: 0018401bug_revision_view_page.php?bugnote_id=0018401#r6875
2011-08-01 00:43asmodaiIssue Monitored: asmodai
2011-08-01 01:51darktealNote Added: 0018405
2011-08-01 07:14asmodaiNote Added: 0018407
2012-02-14 11:59StromkoNote Added: 0019538
2012-02-14 12:09FootkerchiefTag Detached: Intentional/Expected?
2012-02-14 12:09FootkerchiefTag Detached: Needs Confirmation
2012-02-14 12:11snowNote Added: 0019541
2012-02-14 12:12snowNote Edited: 0019541bug_revision_view_page.php?bugnote_id=0019541#r7329
2012-02-14 16:04king doomNote Added: 0019563
2012-02-14 16:13king doomNote Edited: 0019563bug_revision_view_page.php?bugnote_id=0019563#r7336
2012-02-14 16:54fonikzNote Added: 0019566
2012-02-15 07:09FootkerchiefRelationship addedhas duplicate 0005096
2012-02-15 14:25LacNote Added: 0019681
2012-02-15 14:47FootkerchiefRelationship addedhas duplicate 0005058
2012-02-16 17:47VDOgamezNote Added: 0019883
2012-02-19 01:09MaXMCNote Added: 0020101
2012-02-19 01:37DarthCloakedDwarfNote Added: 0020103
2012-02-20 16:17FootkerchiefRelationship addedhas duplicate 0005344
2012-02-21 07:59xaldinNote Added: 0020382
2012-02-21 08:00FootkerchiefNote Edited: 0020382bug_revision_view_page.php?bugnote_id=0020382#r7595
2012-02-21 08:01FootkerchiefIssue Monitored: Toady One
2012-02-21 10:07NW_KohakuNote Added: 0020395
2012-02-21 11:37FootkerchiefRelationship addedrelated to 0005269
2012-02-21 12:24thvazNote Added: 0020403
2012-02-21 22:52xaldinNote Added: 0020433
2012-02-22 16:05xaldinIssue Monitored: xaldin
2012-02-22 22:59NW_KohakuNote Added: 0020521
2012-03-07 02:10thvazNote Added: 0021205
2012-03-07 02:27thvazNote Edited: 0021205bug_revision_view_page.php?bugnote_id=0021205#r7899
2012-03-07 08:04FootkerchiefNote Added: 0021215
2012-03-07 08:04FootkerchiefStatusnew => resolved
2012-03-07 08:04FootkerchiefFixed in Version => 0.34.03
2012-03-07 08:04FootkerchiefResolutionopen => fixed
2012-03-07 08:04FootkerchiefAssigned To => Toady One

2011-02-16 13:23   
More importantly, worldgen seems to get exponentially slower the longer it runs.
2011-02-17 17:33   
Sounds to me like the economic stuff churning away. There's probably alot more going on in world gen these days.
2011-07-31 23:03   
(edited on: 2011-07-31 23:05)
I can definitely confirm this. You see every year that's being generated drop the speed at which it's generated visually. If you have FPS displayed you will notice it drops to 1 FPS after 160 years. It definitely seems to be quadratic or exponential growth.

For me it makes the game pretty much unplayable.

Edit: and that's with 0.31.25

2011-08-01 01:51   
If you don't like it, use a previous version to generate the world. Back in the day, it used to take nearly a week. (Creationist humor, anyone?)
2011-08-01 07:14   
Well, I am positive there's room for improvement in the generation algorithms (and that's the programmer in me speaking). I am used to generate a few worlds at first before settling on one I find appealing for one reason or another. With the latest version taking roughly 15 minutes, it makes that scenario a bit problematic. Not to mention the amount of resident memory the process now uses when it is creating this (500+ MB).

Here's a comparison I did (times are average over 3 gens on a Intel Core 2 Duo @ 2.8 GHz / 4 GB):

0.31.01 - Good (medium region takes about 1:45)
0.31.06 - Good (medium region takes about 1:45)
0.31.08 - Good (medium region takes about 2:00)
0.31.09 - Ok (medium region takes about 2:38)
0.31.10 - Ok (medium region takes about 2:55)
0.31.11 - Good (medium region takes about 2:00)
0.31.12 - Good (medium region takes about 1:55)
0.31.13 - Bad (medium region takes about 8:52)
0.31.24 - Bad (medium region takes about 15:17)
2012-02-14 11:59   
I've been waiting more than an hour for a medium region to be generated on a 2.8 ghz dual-core processor. It's gotten to the year 316 already (I thought I set it to stop at 300), and it will not stop or pause no matter what input I try.
2012-02-14 12:11   
(edited on: 2012-02-14 12:12)
i suggest 200 years for convenience. Last i ran to 270 years it already filled 770mb ram. I'm pretty sure it was going to crash around 1gb anyway...

I doubt toady uses the presets for his testing/playing purposes?

king doom   
2012-02-14 16:04   
(edited on: 2012-02-14 16:13)
I've been creating a new world for about eight hours now - year 297 and over five million events recorded. The longer the world generation goes on the more people there are to generate events about and they have children and so on and it seems like the amount of stuff being recorded is increasing geometrically.

Edit: world gen finished at year 300 like it was supposed to, it recorded 5005742 events.

2012-02-14 16:54   
It's exponentially slower than it was in 31.25. I could make a world with all the defaults in 3 minutes 46 seconds. Now, as others are reporting, it's taking several hours, I end up putting something heavy on my ENTER key to finally get it to stop and let me play.
2012-02-15 14:25   
For completeness I'll cf a Toady One quote: "Yeah, world gen is slower. I can still squeeze something out of it. It's mostly the goods being shuffled around and processed as far as I can tell."
2012-02-16 17:47   
On my Windows 7 computer, it keeps triggering the "not responding" error messages, which sometimes will screw it up. And when I realize that it's not going to make it to the end year I have set, I can't make it abort because it's freezing up and not taking keypresses. I know the game is single threaded, but I wish that there was some extra thread at least for letting me quit when the generator freezes. Despite having an i7 with 16 GB of RAM, it takes at least an hour to even get to the 250 year range, and crashes soon after that. It can go a bit longer if I shrink the world size down and set stricter population limits, but the world isn't much fun if there's nobody there. I don't know how I'll ever make it to the 1050 years the default settings seem to expect.
2012-02-19 01:09   
So it's finally time for DF to go Multi-threaded...
2012-02-19 01:37   
I've noticed that it goes slower the longer history it has.
2012-02-21 07:59   
(edited on: 2012-02-21 08:00)
Since mine was flagged duplicate I'll post the information here:

Essentially werecurses are the key problem. If you set them to 0 it can do a year per second on a modern system. Werecurses bring even high end systems to a halt after a couple hundred years of generation. See 0005344

2012-02-21 10:07   
Hmm... this "worldgen too slow" is from 0.31.19, though, not the new version, so werecritters wouldn't have even been in during this report.

I made a report, myself, but it was specifically about the millions of werecreature attcks taking place in worldgen - http://www.bay12games.com/dwarves/mantisbt/view.php?id=5269 [^]
2012-02-21 12:24   
Since 31.19 generation of medium worlds or larger was really slow. 34.01 just made it worse.
2012-02-21 22:52   
Worldgen has been 'slow'er each version. This one that i reported and had closed as a duplicate of this essentially is worldgen stopping/crashing for all intents caused by werecreature growth.

Ticket handling should have flagged yours or mine as a dup and attached them together into one since 5269 is really closer to what 5344 was about. I just didn't want the testing lost as it gives Toady a place to start looking, assuming this is ever addressed.
2012-02-22 22:59   
I am trying to start a suggestion thread to get some people brainstorming some solutions to slow worldgens. See here: http://www.bay12forums.com/smf/index.php?topic=102293.0 [^]
2012-03-07 02:10   
(edited on: 2012-03-07 02:27)
Someone still think the world generation is too slow? As of 34.05, I think it's fine now.

2012-03-07 08:04   
Thanks for the update. I'll mark this one fixed -- reusing an old report for a new problem was probably not the best idea anyway. If new problems arise, we can handle it in a new report.