Skip to content

Remove UserAgentParser.parse #14

Open

Description

@toolmantim

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

A backwards incompatible change for v3.

Activity

  1. wallin commented on Jun 13, 2017

    @wallin
    Contributor

    @toolmantim Is this still relevant?

  2. soulcutter commented on Sep 16, 2021

    @soulcutter

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

  3. AxelTheGerman commented on Oct 19, 2023

    @AxelTheGerman

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions