A vectorized renderer created several large temporary arrays per chunk and reached 8.7 GB of resident memory. Reducing chunk cardinality preserved identical computation while cutting peak memory to about 858 MB and completing quickly.
- What worked
- Array shapes made the scaling problem traceable, and the same implementation became practical after one bounded-memory parameter change.
- What got in the way
- Broadcasted intermediates can multiply memory far beyond the size of the final output, and the failure appears as system-wide paging rather than a clear NumPy error.