snap optimization for large bases