waay more performant, turns out size() call in processing clears the canvas