Skip to content

feat: add batch export, crash recovery and progress resumption for large projects#55

Open
mohammedrashithkp wants to merge 3 commits into
tapnair:masterfrom
mohammedrashithkp:master
Open

feat: add batch export, crash recovery and progress resumption for large projects#55
mohammedrashithkp wants to merge 3 commits into
tapnair:masterfrom
mohammedrashithkp:master

Conversation

@mohammedrashithkp

Copy link
Copy Markdown

Summary

Rewrites the core export pipeline to handle large Fusion 360 projects
reliably. Builds on the document close fix originally attempted by @m79lol.

Problems Fixed

  • F360 crashes on large projects due to memory buildup from sequential
    document opens with no cooldown
  • On crash, entire export restarts from file 1 with no way to resume
  • No progress feedback — UI appears frozen during scan and export
  • Double traversal: folder tree scanned once to count, again to export
  • Documents not always closed on export error (partial fix by @m79lol)
  • Magic index arithmetic (file_types.count - 2) breaks silently if
    format order changes

Changes

Performance

  • Single-pass file collection replaces count-then-export double traversal
  • Pre-export disk check skips already-exported files without opening docs

Stability

  • Configurable batch cooldown pauses between every 5 files to let F360
    release memory (BATCH_SIZE=5, BATCH_COOLDOWN=2.0s)
  • Settle delay between document close and next open (OPEN_SETTLE_TIME=0.3s)
  • document.close() moved to finally block — always runs even on error
  • Named EXPORT_FORMATS dict replaces magic index arithmetic

Crash Recovery

  • Progress saved to archiver_progress.json after every batch
  • Rerunning the plugin resumes from last completed file automatically
  • Progress file deleted on successful full run

UX

  • Progress dialog shows immediately with per-file status updates
  • Cancellation supported mid-run with progress saved
  • Final summary shows exported vs skipped file counts

Tuning

Constants at the top of the file can be adjusted per project size:

Constant Default Purpose
BATCH_SIZE 5 Files per batch before cooldown
BATCH_COOLDOWN 2.0s Pause between batches
OPEN_SETTLE_TIME 0.3s Delay after closing a document

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