Slightly faster analysis logic for large libraries

Remko shared this idea a month ago

Complete
Improve