before/uadetector — pull request #68 by mspiegel (2014-03-19 02:09:38+00:00)
Title: Support for whitelist or blacklist user agent browsers.

The diversity of user agents that can be identified is fantastic! The downside of this comprehensive coverage is the number of regular expressions that must be tested per user-agent string. This patch allows the configuration of a whitelist or a blacklist of user agent names. The filtering is applied when the data file is parsed. It allows the user to trade-off accuracy for performance. I have tested this patch against a sample data set using a white list filter of top 50 user agents. I've observed a x2 performance improvement and that after applying an aggressive caching strategy to avoid parsing previously seen input strings.