Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Enhancements #30

Open
switzer opened this issue Dec 27, 2017 · 1 comment
Open

Performance Enhancements #30

switzer opened this issue Dec 27, 2017 · 1 comment

Comments

@switzer
Copy link

switzer commented Dec 27, 2017

Super useful site. I wish I had used it when we selected our library. Here are some enhancements I'd love to see (and forgive me if they are already there and I did not see them!):

  1. Language of the library. For example the piwik library looks great but is implemented in PHP so not useful to my Erlang project.
  2. More robust performance numbers. For example, median parsing for a library could be blazing fast, because most user agents are easy to parse/in a cache/etc, but hard UA could take time. It would be great to show average AND median across (and for that matter, max and min) ALL UA strings.
  3. For libraries that have a list of regex strings and then a number of clients in various languages that implement the regex's, it would be great to see each of these as a separate test, with their own performance numbers, etc.
@NielsLeenheer
Copy link
Contributor

Hi Scott 👋🏻

I definitely would like to see this expand to other languages and platforms. And also see the difference between the same library on different platforms.

Regarding measuring average and median.

I don't think optimising for the most common or easy to parse user-agent strings is worth the effort. Just about any caching method will take care of this automatically and will be faster than any optimisation made to the parsing stage. Just testing without caching enabled will give a good idea of the speed of the library for the actual parsing but has little to do with real-world speed. That being said, I should do some testing with various cache sizes and expiration times to see what the cache hit/miss ratio is on an average site, so we actually have data about how effective the cache actually is.

On the other hand, using the median and average as an indicator of the speed of 'difficult' user-agents might be interesting in order to make sure a library isn't just fast on the most common user-agent strings, but fast overall. But I am afraid this is very difficult to make conclusions based on this, because a 'difficult' string might be very fast to parse and give the wrong result, or it could be very slow and give the right result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants