tobie/ua-parser — pull request #62 by rjd22 (2012-09-26 12:43:55+00:00)
Title: Deleted all statics, Cleaned up the comments and Sped up the script by 100x

I'm using the script for a project I'm working on and it's great. The problem was that when you have to parse 100 user agents it would take 2.63s to parse them all.

When I checked out the script I noticed that with every parse it would load the yaml. This is unneeded since loading takes really long and one time is more than enough. I changed the script to make use of objects and build the yaml array on construct.

After the change 100 user agents take 0.12s.

I think it's worth to break API for this change. :)