View Issue Details

IDProjectCategoryView StatusLast Update
0010025Dwarf FortressDwarf Mode -- Interface, Stockspublic2024-08-22 21:45
ReporterEldritchVoid Assigned Tolethosor  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
OSWindows 10 
Product Version0.43.05 
Fixed in Version50.01 
Summary0010025: Lagging in stocks
DescriptionEvery time I try to go past stocks the game freezes for a few seconds, has happened across several games

Steps To Reproduce1. Go to stocks screen
2. Scroll past stocks
Additional InformationModified underground crops to grow in all seasons, changed animal person size so that they can use armor, doubt modifications are relevant
TagsNo tags attached.

Activities

Loci

2016-10-02 13:41

viewer   ~0035927

Of particular note, the lag occurs/worsens when there are very large numbers of items in the given category (e.g. 5,000+). The UI freezes when a category is selected, presumably while the items in the category are prepared for display in the right pane. Simply decoupling the category selection UI from the right-pane display (so that the user can fluidly move past categories they aren't interested in before the right pane is populated) would go a long way toward mitigating this issue.

lethosor

2017-05-30 19:42

manager   ~0036578

This looks like 0003878, 0004513, 0004672, and maybe others.

I'm not entirely sure what you mean by your suggestion - are you talking about not displaying anything at all in the right column until the user selects something in the left column explicitly?

Loci

2017-05-31 14:16

viewer   ~0036579

Sure, and since all those issues were closed without resolving the problem... the problem still exists.

The proposed fix would allow the player to continue moving the selector in the left pane while the right pane was being processed/populated, thereby making the player wait for the right pane to complete only if they actually wanted to see everything in that category, not just move past it on the list. That is a rather standard way to handle a UI with excessively long implicit operations.

Quietust

2024-08-21 07:34

reporter   ~0042314

Last edited: 2024-08-21 07:56

For what it's worth, this delay was caused by the stocks screen performing sorted inserts for every single item, causing vast amounts of time to be wasted shuffling memory around to insert items in the middle of the list; patching it to perform unsorted inserts and then do a single sort at the end removed the lag entirely.

However, this no longer appears to be an issue in the current version.

Issue History

Date Modified Username Field Change
2016-10-02 09:32 EldritchVoid New Issue
2016-10-02 13:41 Loci Note Added: 0035927
2016-10-02 13:41 Loci Assigned To => Loci
2016-10-02 13:41 Loci Status new => confirmed
2017-05-30 19:42 lethosor Note Added: 0036578
2017-05-31 14:16 Loci Note Added: 0036579
2024-08-21 07:34 Quietust Note Added: 0042314
2024-08-21 07:56 Quietust Note Edited: 0042314
2024-08-22 21:45 lethosor Assigned To Loci => lethosor
2024-08-22 21:45 lethosor Status confirmed => resolved
2024-08-22 21:45 lethosor Resolution open => fixed
2024-08-22 21:45 lethosor Fixed in Version => 50.01