If your map is big then try to limit the distance the rays go.