Expected behavior
Similar execution time for both cases, whether locale is set or not.
Versions:
OS: macOS 14.5
JDK 21
Faker Version 2.3.0
Additional context
I will send a PR soon with a bugfix that improves performance, but the results with the locale specified are still not as good as without.
Describe the bug In the latest version, I found a performance hit when the locale is specified.
No locale: Time to process 1000000 values: 2.310795584s
Locale en-GB: Time to process 1000000 values: 40.341209708s
The results are not precise but the difference is abnormal.
To Reproduce Code to reproduce is here: https://github.com/vitaly-ivanov/datafaker-memory-leak/blob/main/app/src/main/kotlin/org/example/Performance.kt
Expected behavior Similar execution time for both cases, whether locale is set or not.
Versions:
Additional context I will send a PR soon with a bugfix that improves performance, but the results with the locale specified are still not as good as without.