View Issue Details

IDProjectCategoryView StatusLast Update
0005967Dwarf FortressDwarf Mode -- Invasionspublic2012-05-29 13:00
Reporterag Assigned To 
PrioritylowSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version0.34.10 
Summary0005967: A pending but delayed werebeast arrival causes lag.
DescriptionWhen 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.
Steps To ReproduceDownload 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.
Additional InformationProfiling 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.
TagsNo tags attached.

Activities

Quietust

2012-05-29 10:59

reporter   ~0022776

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.

ag

2012-05-29 13:00

reporter   ~0022778

I feel rather that frequent rechecking is intended; what's not intended is the actual cost of rechecking the event.

Add Note

Note

Issue History

Date Modified Username Field Change
2012-05-29 00:43 ag New Issue
2012-05-29 10:59 Quietust Note Added: 0022776
2012-05-29 13:00 ag Note Added: 0022778