IT
OmnvertImage • Document • Network
Apr 10, 2026stl · worker · stability · performance

Memory Leak Fixed in STL Generation

We fixed a retention issue in the conversion worker that could increase memory usage during long batch sessions and abort-heavy traffic.

Symptoms

  • Memory usage could grow during long-running sessions, especially with many cancelled conversions.
  • Some users observed slower UI responsiveness after many conversions (GC pressure).
  • Abort-heavy traffic could leave queued stream chunks longer than expected.

Root cause

  • An abort path kept references to large ArrayBuffers (image rasters + intermediate mesh buffers) longer than needed.
  • Some streaming responses weren’t releasing back-pressure queues promptly when the client disconnected.

Fix

  • Explicit cleanup on abort: intermediate buffers are nulled and GC-friendly within the same tick.
  • Stream finalization hardening: we close/tear down streams on disconnect to prevent queued chunks from piling up.
  • More aggressive timeouts for hung conversions (without impacting successful long-running jobs).
Operational notetext
- If you batch-convert many PNGs to STL, keep the tab open until downloads finish.
- If you cancel conversions frequently, this update prevents memory from creeping over time.
- We also improved abort handling to return faster and free resources sooner.

Verification

  • Stress tests with repeated convert/abort cycles to ensure buffers are released quickly.
  • Disconnect simulations to verify stream teardown and queue cleanup.
  • Monitoring memory plateaus instead of unbounded growth during long sessions.
Recommended workflow

For stable results in long sessions, start from a single high-quality PNG, validate scale/thickness, then repeat with new inputs.

Convert here: PNG / SVG → STL converter.

Related