The JS operations are really lengthy.
Would it somehow be possible to make them async and yet return values?