Optimizes dungeon generation and shrinking to reduce node building time