Skip to content

Make field bale scans cooperative - #2

Closed
WizardlyPayload wants to merge 1 commit into
mainfrom
cursor/bale-scan-performance-703b
Closed

Make field bale scans cooperative#2
WizardlyPayload wants to merge 1 commit into
mainfrom
cursor/bale-scan-performance-703b

Conversation

@WizardlyPayload

@WizardlyPayload WizardlyPayload commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Routes the default field collector path through cooperative coroutine steps so bale-heavy saves do not scan every bale in one frame.
  • Reuses bale position and parcel matching results across per-field counts and bale inventory totals.
  • Adds a Jest guard that verifies the cooperative bale scan shape stays in place.

Testing

  • luac -p ../../FS25_FarmDashboard_Mod/FS25_FarmDashboard_Mod/src/collectors/FieldDataCollector.lua
  • npm test -- fieldBaleScanCooperative.test.js
  • npm test
  • Lua runtime harness with 3,500 fake bales completed over 71 collector steps.
Open in Web Open in Cursor 

Co-authored-by: WizadlyPayload <WizardlyPayload@users.noreply.github.com>
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