Skip to content

Don't compile user agent regexes on every call #2504

@matrixbot

Description

@matrixbot

This issue was originally created by @sandhose at matrix-org/matrix-authentication-service#2504.

We have a few regexes that are compiled on each UA parsing. Those should be in static cells instead and compiled on startup instead

https://github.com/matrix-org/matrix-authentication-service/blob/5b5346ebb77dd10fbc49c9641e794ba70aed76d4/crates/data-model/src/user_agent.rs#L48

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions