Merge branch 'faster'

Results in 5x to 10x speedup in scanning.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=64766