optimized filterSegments, and and failed attempt to optimize lsd_encuadro. a backup is on lsd_optimizer. we need more validation