uap-ruby icon indicating copy to clipboard operation
uap-ruby copied to clipboard

Remove UserAgentParser.parse

Open toolmantim opened this issue 11 years ago • 3 comments

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

A backwards incompatible change for v3.

toolmantim avatar Jan 21 '14 05:01 toolmantim

@toolmantim Is this still relevant?

wallin avatar Jun 13 '17 19:06 wallin

@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.

soulcutter avatar Sep 16 '21 14:09 soulcutter

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

AxelTheGerman avatar Oct 19 '23 16:10 AxelTheGerman