Skip to content

fix: keep progressBar alive during MapDataStoreable iterations#103

Open
terbin wants to merge 1 commit into
Avanatiker:1.21.4from
terbin:fix/progressbar-mapdata-iterations
Open

fix: keep progressBar alive during MapDataStoreable iterations#103
terbin wants to merge 1 commit into
Avanatiker:1.21.4from
terbin:fix/progressbar-mapdata-iterations

Conversation

@terbin

@terbin terbin commented May 19, 2026

Copy link
Copy Markdown

MapDataStoreable.store() writes each map_*.dat synchronously in its forEach loop. On captures with thousands of maparts the loop blocks the IO coroutine for many seconds without touching StorageFlow.lastStoredTimestamp, so BarManager.updateCapture's decay branch (default 3000ms) clears lastStored and the progressBar widget disappears mid-save.

Mirror the timestamp-refresh pattern from MetadataStoreable and CompressLevelStoreable: refresh lastStoredTimestamp per iteration, and seed lastStored at store() entry so the progressBar text reads "Saved maps in dimension X" through the slow phase.

Verification

progressBar stays visible during MapDataStoreable on a 2b2t mapart-exhibition reproducer (10k+ maparts), confirmed across the full save phase instead of vanishing after ~3s of forEach blocking.

MapDataStoreable.store() writes each map_*.dat synchronously in its forEach loop. On captures with thousands of maparts the loop blocks the IO coroutine for many seconds without touching StorageFlow.lastStoredTimestamp, so BarManager.updateCapture's decay branch (default 3000ms) clears lastStored and the progressBar widget disappears mid-save.

Mirror the timestamp-refresh pattern from MetadataStoreable and CompressLevelStoreable: refresh lastStoredTimestamp per iteration, and seed lastStored at store() entry so the progressBar text reads "Saved maps in dimension X" through the slow phase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant