Skip to content

Fix: quickfort UI freeze on large blueprints and strip undocumented ghost-features#1597

Open
sizzlins wants to merge 1 commit into
DFHack:masterfrom
sizzlins:fix/quickfort-lag-and-ghost-code
Open

Fix: quickfort UI freeze on large blueprints and strip undocumented ghost-features#1597
sizzlins wants to merge 1 commit into
DFHack:masterfrom
sizzlins:fix/quickfort-lag-and-ghost-code

Conversation

@sizzlins

@sizzlins sizzlins commented Jun 26, 2026

Copy link
Copy Markdown

Title: Fix: quickfort UI freeze on massive blueprints and strip undocumented ghost-features

This PR addresses severe UI lag when selecting massive blueprints (e.g. industry2) in the gui/quickfort overlay, and removes broken, undocumented ghost-code from the core quickfort.lua parser.

Fixed massive UI render lag
onRenderFrame was synchronously re-parsing the blueprint CSV and reevaluating thousands of matrix tiles 60 times a second whenever the mouse moved. This completely froze the game engine.

  • Decoupled the rendering loop from the CSV parsing logic.
  • Implemented a true 50ms backend throttle to ensure the DF engine always gets processing time between blueprint recalculations.
  • Added a visual coordinate shift (dx, dy, dz) to the cached preview tiles. The blueprint now perfectly tracks the mouse at a smooth 60 FPS while the heavy collision math runs asynchronously in the background.

Removed argparse.stringList
The action argument was previously being run through argparse.stringList(action). This undocumented feature bypassed the safety mechanism (not dfhack.isMapLoaded()) because the literal action string check (action == 'run') fails if the string is "run,orders".

  • Removed the implementation to enforce single-action processing, fixing the safety bypass and adhering to standard quickfort usage documentation (YAGNI).

Removed reduce_transform()
The UI had a 25-line mathematical reduce_transform() block dedicated purely to minimizing the length of a UI display text label when a user hit the rotate hotkey multiple times.

  • Deleted the function to simplify the UI loop. transformations now behaves as a standard array.

  • Updated SELECT_ALL to SEC_SELECT as the 51.01 transition has been stable for multiple major releases.

@ab9rf

ab9rf commented Jun 26, 2026

Copy link
Copy Markdown
Member

This PR seems to combine two unrelated changes, one related to quickfort and one implementing some sort of manual-save feature, possibly the same as the one in #1583.

Please don't bundle unrelated changes into a single PR.

@sizzlins sizzlins force-pushed the fix/quickfort-lag-and-ghost-code branch 5 times, most recently from 292b40a to e6ab51d Compare June 26, 2026 16:46
@sizzlins sizzlins force-pushed the fix/quickfort-lag-and-ghost-code branch from e6ab51d to ad9eac2 Compare June 26, 2026 17:35
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.

2 participants