With permission of Jam host I updated the build with fixes for the long level generation.
Mostly I replaced random function that was constructed every time it called to a random struct with seed that initialized at the beginning. Also I added caching of the tile with lowest count of variants in the tile updates.
But major improvement was from disabling v-sync =\
While it did not make a magic for html version, the desktop build boosted from 2min of generatio to ~15seconds.
For fairness I did not touch any other known bug :)
Hope you will enjoy my game without the unnecessary wait