Simulation memory: about 1 KB per G-code line, built up front (parse records + timeline + column-engine objects)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript, wasm
- Domain
- performance
Research direction
The per-line cost lives in the parse records, the timeline and the column engine's per-move objects; start from the simulation worker's build step and measure heap per line on the panther 0.24 mm repro from #889. The change replaces those structures with packed typed arrays modelled on #889's MoveStore and builds column-engine moves lazily. Done when the simulated surface matches cell for cell and a 2M-line program simulates under 1 GB.
Written by the indexing model from the issue text.
Description
Found by #889's measurements, 2026-11-01. The simulation keeps about 1.1 KB per G-code line, all built before the sweep starts:
- parse records, about 520 B per line;
- the timeline, about 340 B per line;
- the column engine's per-move objects.
The sweep itself doesn't grow: no solid per checkpoint, and at most 32 grid anchors (about 110 MB). So a 400k-line goal program costs about 450 MB in the sim worker, on top of whatever the page holds. That's what crashed the elephant on k3 (#896).
#889 cut the line count about 20× (merged moves, roughing that skips finished cells), which fixes today's jobs. The per-line cost still caps how big a program can be simulated in a tab:
- the budget is 640 MB on a desktop, 256 MB on a phone;
- the budget refusal is computed at that same 1.1 KB per move.
Fix: hold the parsed program and the timeline in packed typed arrays, like #889's MoveStore (aim for 60 B per line or less). Build the column engine's moves lazily or stream them per segment rather than up front. Then raise the move budget to match.
Acceptance:
- sim-worker heap per line measured before and after, on the panther at 0.24 mm (from #889's repro, about 342k G1);
- the simulated surface identical cell for cell;
- a 2M-line program simulates under 1 GB.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SlyWombat/CaseMaker
-
bug fabrication ready
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
after-1.0 enhancement fabrication
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
bug fabrication ready
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
bug fabrication ready
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Two-setup sphere and datum plans exceed the tests' 90 s limits at the tip (pre-existing at 20c3d3c4)Openbug
Difficulty 4/5 3-5 days Newbie friendliness 56/100
All issues in SlyWombat/CaseMaker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
transitmatters/shutdown-tracker#155 ·
Maintainers usually reply within 2 days
-
Popping out a single panel leaves its always render overlay in the main window, blocking clicksOpenbug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
"Claude Code request is missing its initial user message" when the prompt starts with an image pathOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
earendil-works/pi-claude-code#31 ·
Maintainers usually reply within 8 days
-
bug pending triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
privatenumber/cleye#48 ·