SineSwiper/grm — comment on commit b8a50f6fbf6ad6738092db8e1f7dce771a574236
File: MapGen/Generator/Basic.pm line 127
By SineSwiper:

Yeah, that's why I put in the ProgressBars, was to figure out exactly which parts were taking the longest. The two that stood out were the two functions here.

As far as the @{[ ]} syntax, the groups don't have much data at this point. (In fact, at this point, there usually aren't any groups. But, just in case another generator adds rooms beforehand...) Besides, it's about where expensive stuff is at, outside the main loop. So, it's not a big deal here.

I designed it to be just like the old version, too, despite its changes. Even to the point that I thought about ordering the rooms by size, but realized that it would change the way rooms would be placed (so I ditched that idea). Part of the problem of the i-j loop is that it was actually an i-j-y-x loop. The @loc_slice fixes that, and the room skipping fast-forwards any constant x++/next loops when it hits the same room over and over again.