Does this use Web Workers? It seems like a great use for them. Although, I haven't been able to get it to take more than a half second on my system so I haven't noticed performance issues.
I didn't know about web workers until now, would be a nice to try! I'm not sure though if they work well with ProcessingJS...