Skip to content

[Performance] Using a default instance (like EMPTY) on to reduce object creation of UserAgentDetectionResult #29

Description

@trinhnx

When UserAgentDetector.parseUserAgent() with null or short header, it returns an empty result which has default value.
IMHO, this value could be served as a Static instance to reduce the creation.
Moreover, the Device, Bot, Locale, OS or Browser also have the empty instance.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions