Skip to content

[statsd] Optimize tag normalization further #673

@sgnn7

Description

@sgnn7

Is your feature request related to a problem? Please describe.

Profiling statsd operations still points to an extremely high utilization of re.sub operations (used in normalize_tags function)

Describe the solution you'd like

Optimize normalize_tags to take less computational complexity by using the Python3 built-in @lru_cache decorator

Describe alternatives you've considered

Homebrew LRU cache can be done if we want improvements on Python2 but due to pressure to not include further dependencies and possibility of incidental problems made this a non-starter (for now).

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions