Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0005967Dwarf FortressDwarf Mode -- Invasionspublic2012-05-29 00:432012-05-29 13:00
ag 
 
lowminoralways
newopen 
0.34.10 
 
0005967: A pending but delayed werebeast arrival causes lag.
When a scheduled werebeast arrival event becomes ready, but is not immediately resolved (presumably because of phase of moon problems, or somesuch), the game re-evaluates the fortress wealth every 10 frames, which is a waste.

Admittedly, the lag reaches visible proportions only if the map is revealed with dfhack, but it is still there at about 10% cpu even if reveal is reverted, and it will increase as the fortress expands and especially caverns are revealed.
Download this save: http://dffd.wimbli.com/file.php?id=5941, [^] and let it run for a few minutes. Since it is revealed, the lag will be very visible.
Profiling results before lag starts (maybe including a second of it):
http://cloud.github.com/downloads/angavrilov/dfprofile/log.unsm1.svg [^]
Profiling results with lag (see bottom left corner):
http://cloud.github.com/downloads/angavrilov/dfprofile/log.unsm2.svg [^]

Profiling results before lag with unrevealed map:
http://cloud.github.com/downloads/angavrilov/dfprofile/log.unsm3.svg [^]
Profiling results with lag with unrevealed map:
http://cloud.github.com/downloads/angavrilov/dfprofile/log.unsm4.svg [^]

In the second case the lag is only visible in profiling results, so minor/low. The effect of revealing here is that hidden tiles are skipped after only a flag check, while visible ones receive extended processing to compute architecture value.
No tags attached.
Issue History
2012-05-29 00:43agNew Issue
2012-05-29 10:59QuietustNote Added: 0022776
2012-05-29 13:00agNote Added: 0022778

Notes
(0022776)
Quietust   
2012-05-29 10:59   
In this particular case, the event happens at season tick 4597, which is on the 10th of Malachite. Once it starts delaying, the event's trigger date is seemingly being reset to zero; presumably, it was supposed to be incrementing it by some significant amount to prevent it from immediately retriggering.
(0022778)
ag   
2012-05-29 13:00   
I feel rather that frequent rechecking is intended; what's not intended is the actual cost of rechecking the event.