Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(ua): Disables unicode support in user agent parser (#3929)
Disables unicode support for the user agent regexes, this is generally safe to do as the library puts it: ``` /// Enable or disable unicode support. This is enabled by default. /// Unicode regexes are much more complex and take up more memory. /// Most uaparser implementation do not support unicode, so disabling /// this is generally safe to do. ``` It saves a lot of memory: ``` used memory `uaparser_no_unicode()`: peak: 28.38 MiB | total: 169.18 MiB | current: 28.32 MiB used memory `uaparser()`: peak: 165.05 MiB | total: 1.10 GiB | current: 164.80 MiB ``` And using the parser with 10 threads: ``` used memory `uaparser_used(false)`: peak: 109.06 MiB | total: 254.88 MiB | current: 109.06 MiB used memory `uaparser_used(true)`: peak: 519.80 MiB | total: 1.46 GiB | current: 519.71 MiB ```
- Loading branch information