optimize visitor generation