perf: replaces list of postcodes in ja/address.yml with a 7-digit format
#3201
+1
−120,288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

(fixes #3200)
This PR replaces the full list of postcodes with a 7-digit format for
ja/address.yml.The reason is for performance, as generating a postcode in this locale
is too expensive.
Japanese postal codes were changed from a simple pattern to a list of real postal codes, introduced in #2297.
The problem is that when running Faker on
locale = 'ja', about 60% of the time to load and callFaker::Address.postalcodeis spent reading and parsing the ja/address.yml file, which has 2.2mb.Benchmark:
This has the potential to improve the performance of generating
postcodes in japanese by 65%, as well as loading in general.
Gem size will also decrease by 200kb. 🎉
1.6M -> 1.4M