As the rendering blocks the whole js thread currently, maybe I should use webworkers to do this in a non-blocking way.