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

Remove UserAgentParser.parse #14

Open
toolmantim opened this issue Jan 21, 2014 · 3 comments
Open

Remove UserAgentParser.parse #14

toolmantim opened this issue Jan 21, 2014 · 3 comments

Comments

@toolmantim
Copy link
Contributor

It causes unexpected performance problems (#4 #5 #13). The simpler UserAgentParser.new.parse should be less confusing.

A backwards incompatible change for v3.

@wallin
Copy link
Contributor

wallin commented Jun 13, 2017

@toolmantim Is this still relevant?

@soulcutter
Copy link

@wallin This is still relevant. We hit this footgun using the class method in a rails request - loading the yaml and compiling the regexes on every request. This added about 40-50ms per-request, which is quite unexpected and one of those things that's really easy to miss when you first introduce using this gem - though I appreciate the readme does attempt to address it.

If the docs clearly stated "Expect this method to take 50ms" I suspect nobody would use it. I support this issue.

@AxelTheGerman
Copy link

First step could be to add a deprecation warning maybe? That could already educate and also help transition.

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

4 participants