More efficient scroll-edge-detection