Moved the actual map generation to a thread.